Skip to contents

Writes adsl <- haven::read_xpt("data/adam/adsl.xpt") (the reader follows the file's extension: .rds, .xpt, .sas7bdat, .csv, .parquet, and .rda / .RData holding one dataset) into an object named after the dataset, and its derived columns.

Usage

tfl_read_data_code(datasets, dataset)

Arguments

datasets

The data catalog: a data frame with dataset, path and derive (NAME = R expression, | between them), as the datasets sheet of an tfl_ard_spec().

dataset

The dataset to read.

Value

The code, one element per line. A dataset the catalog does not have gives a stop() line, so the program says so when it runs.