Prepare a site-level summary of detailed activity results by PoD and LoS
export_detailed_activity_data.RdIntended to be used to create a table to be exported to .csv/.xlsx
Usage
export_detailed_activity_data(
results,
pod_lookup = get_detailed_pods(),
tretspef_lookup = get_tretspef_lookup(),
aggregation = c("age_group", "tretspef_grouped"),
sites = NULL
)Arguments
- results
A named list containing NHP results tables
- pod_lookup
A tibble, or a function that returns a tibble, containing columns named
activity_type_label,podandpod_label. This provides friendly labels for POD variables in the data.podis the key column used for joining to data tables.- tretspef_lookup
A tibble, or a function that returns a tibble, containing a
codecolumn (used as a key for joining to the tretspef table) and atretspefcolumn that provides friendly labels for specialties- aggregation
string. One of "age_group" or "tretspef_grouped"
- sites
Either
NULL(the default) or a vector of site codes to filter to.NULLmeans don't filter; include all sites present in the data