Skip to contents

Load a roster file

Usage

load_roster(
  data_folder = ".",
  roster_file = "roster.csv",
  strict_errors = FALSE
)

Arguments

data_folder

Directory containing the roster file

roster_file

Name of the roster CSV file

strict_errors

Logical; if TRUE, throw error when file doesn't exist

Value

A tibble containing the roster rows. When an enrolled column is present, only rows where it is TRUE are returned. A missing file returns an empty tibble unless strict_errors = TRUE.

Examples

roster_path <- tempfile(fileext = ".csv")
readr::write_csv(
  tibble::tibble(student_id = "S001", preferred_name = "Student One"),
  roster_path
)
roster <- load_roster(roster_path)
unlink(roster_path)