10.1 Load packages and import data

Load the tidyverse, skimr, naniar, and infer packages:

library(tidyverse)
library(skimr)
library(infer)
library(naniar)

Import the CSV file called “damselfly”:

damselfly <- read_csv("https://raw.githubusercontent.com/ubco-biology/BIOL202/main/data/damselfly.csv")
## Rows: 20 Columns: 1
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): direction
## 
## ℹ 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.

Get an overview of the dataset:

damselfly %>%
  skim_without_charts()
(#tab:hyp_overview)Data summary
Name Piped data
Number of rows 20
Number of columns 1
_______________________
Column type frequency:
character 1
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
direction 0 1 9 17 0 2 0

And view the first handful of rows:

damselfly
## # A tibble: 20 × 1
##    direction        
##    <chr>            
##  1 clockwise        
##  2 counter_clockwise
##  3 counter_clockwise
##  4 clockwise        
##  5 counter_clockwise
##  6 counter_clockwise
##  7 counter_clockwise
##  8 counter_clockwise
##  9 counter_clockwise
## 10 counter_clockwise
## 11 counter_clockwise
## 12 clockwise        
## 13 counter_clockwise
## 14 counter_clockwise
## 15 counter_clockwise
## 16 counter_clockwise
## 17 counter_clockwise
## 18 counter_clockwise
## 19 counter_clockwise
## 20 counter_clockwise