14.1 Load packages and import data
Load the tidyverse
, knitr
, naniar
, car
, skimr
, and janitor
packages:
library(tidyverse)
library(knitr)
library(naniar)
library(janitor)
library(skimr)
library(car)
And we also need the broom
package, which may be new to you.
library(broom)
The following datasets are required:
- the “blackbird” dataset. These are the data associated with Example 12.2 in the text (page 330)
- the “students” dataset, describing characteristics of students from BIOL202 from several years back
<- read_csv("https://raw.githubusercontent.com/ubco-biology/BIOL202/main/data/blackbird.csv") blackbird
## Rows: 26 Columns: 3
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): time
## dbl (2): blackbird, Antibody
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
<- read_csv("https://raw.githubusercontent.com/ubco-biology/BIOL202/main/data/students.csv") students
## Rows: 154 Columns: 6
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): Dominant_hand, Dominant_foot, Dominant_eye
## dbl (3): height_cm, head_circum_cm, Number_of_siblings
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.