data

To work outside of this tutorial you need to download the following data file:

Set up an r rstudio() project in the way that I recommend in this video, and save the data files to the folder within your project called [data]{.alt}. Place this code in the first code chunk in your r quarto() document:

liar_tib <- here::here("data/biggest_liar.csv") |> read_csv()
exam_tib <- here::here("data/exam_anxiety.csv") |> read_csv()

Preparing data

To work outside of this tutorial you need to turn categorical variables into factors and set an appropriate baseline category using as_factor and fct_relevel from the forcats package.

For [liar_tib]{.alt} execute the following code:

liar_tib <- liar_tib |> 
  mutate(
    novice = as_factor(novice)
  )

For [exam_tib]{.alt} execute:

exam_tib <- exam_tib |>
  mutate(
    id = as_factor(id),
    sex = as_factor(sex)
  )


Try the discovr package in your browser

Any scripts or data that you put into this service are public.

discovr documentation built on Feb. 5, 2026, 5:07 p.m.