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:

download_tib <- here::here("data/download_festival.csv") |> read_csv()

Preparing data

To work outside of this tutorial you need to convert the ticket number (ticket_no) to a character variable (so r rproj() doesn't confuse it for a number) and convert gender to a categorical variable and set the order of factor levels to match the data in the r rproj() package. To do all of this, execute the following code:

download_tib <- download_tib |> 
  dplyr::mutate(
    ticket_no = as.character(ticket_no),
    gender = as_factor(gender) |> fct_relevel("Male", "Female", "Non-binary")
  )


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.