Runs tfl_ard_code() from the study folder: the ARD is exactly what the
code gives.
Usage
tfl_build_ard(
spec,
dir = ".",
output_id = NULL,
save = TRUE,
statistics = NULL,
methods = NULL,
codelists = NULL
)Arguments
- spec
An
tfl_ard_spec()(or the path of one), or a study of the YAML spec (tfl_read_study_spec()): its data catalog and its reports'ard.analysis_data/ard.analyses, the reports in the TOC's order, its code lists the reports' own (whencodelistsisNULL).- dir
The study folder (the code's working directory).
- output_id
Only these outputs' analyses;
NULLfor all.- save
FALSEleaves out the finalsaveRDS(). For one report's"body",TRUEends it insave_ard()(its rows into the study ARD, with the definition's fingerprint),FALSEinard.- statistics, methods
The catalogs (
tfl_ard_statistics(),tfl_ard_methods()) to use instead of the current ones.- codelists
The reports' code lists: a table definition (its
codelistssheet) or a data frame withoutput_id,variable,value,labelandorder. A code list is a report's: every row names its report (a blankoutput_idstops). A report's rows of the variables its analyses read (by,strata,variables, and the names inargs,codeandpost) count: the program writes them at its head (cl_sex <- c(F = "Female", M = "Male")) and puts them on the data the analyses read (set_levels(SEX = cl_sex)): each column a factor in the list's order, its values the labels (a value without one stays itself) – the ARD holds"Female", and counts a level no record has (n = 0). A value the list does not have (not NA) stops the program. An analysis'swhereon such a column is written in its labels: one that names a value whose label differs stops here. In the study's program, each report's part reads its data again with its own.NULL(default): the data as read.