Skip to contents

Read a Source Linkage episode file

Usage

read_slf_episode(
  year,
  col_select = NULL,
  partnerships = NULL,
  recids = NULL,
  as_data_frame = TRUE,
  dev = FALSE,
  columns = lifecycle::deprecated()
)

Arguments

year

Year of the file to be read, you can specify multiple years which will then be returned as one file. It will be converted to short FY using format_year().

col_select

A character vector of column names to keep, as in the "select" argument to data.table::fread(), or a tidy selection specification of columns, as used in dplyr::select().

partnerships

Optional specify a partnership (hscp2018) or partnerships to select.

recids

Optional specify a recid or recids to select.

as_data_frame

Should the function return a tibble (default) or an Arrow Table?

dev

[Experimental] Whether to get the file from the development area (/conf/sourcedev/Source_Linkage_File_Updates). The default (FALSE) will get the production file from the usual area.

columns

[Deprecated] columns is no longer used, use col_select instead.

Value

The requested SLF data as a tibble or an Arrow Table.

Examples

if (FALSE) { # \dontrun{
read_slf_episode("1718",
  col_select = c("anon_chi", "dob", "demographic_cohort")
)

read_slf_episode(c("1718", "1819"),
  col_select = c("anon_chi", "dob", "demographic_cohort"),
  as_data_frame = FALSE
)
} # }