Section 6.3 Loading Our Data
This chapter uses the
infection_treatment dataset from the companion R reproresearchR package ([D.1.24]). Refer back to SubsectionΒ 2.3.2 to find out more about the reproresearchR package if needed.
Instead of using the
summary() or str() functions, we are going to experiment with the skim() function from the skimr package ([D.1.25]) to investigate our data.
library(tidyverse)
library(reproresearchR)
infection <- reproresearchR::infection_treatments
library(skimr)
skim(infection)
ββ Data Summary ββββββββββββββββββββββββ
Values
Name infection
Number of rows 150
Number of columns 2
_______________________
Column type frequency:
character 2
________________________
Group variables None
ββ Variable type: character ββββββββββββββββββββββββββββββββββββββββββββββββββββ
skim_variable n_missing complete_rate min max empty n_unique whitespace
1 Infection 0 1 2 3 0 2 0
2 Treatment 0 1 7 13 0 3 0
We can see our data nice and loaded. There are two columns, Infection and Treatment which are both categorical, and there are 150 rows. Thankfully, we do not have any missing data. Letβs dig a little deeper into our data.
