Create a data source object for cfa-dataops NHSN data
Source:R/fetch_reporting_data_cfa_dataops.R
cfa_dataops_source.RdCreate a data source object for cfa-dataops NHSN data
Usage
cfa_dataops_source(
target = c("covid", "flu", "rsv"),
prelim = TRUE,
dataset_namespace = NULL,
stage = "load",
command = "dataops_save",
cache_dir = NULL,
force = FALSE,
run_dataops_save = NULL
)Arguments
- target
Character, disease target:
"covid","flu", or"rsv".- prelim
Logical. If
TRUE, use the preliminary NHSN HRD dataset.- dataset_namespace
Character. Optional cfa-dataops dataset namespace. Defaults to the cfa-stf NHSN HRD namespace implied by
prelim.- stage
Character. cfa-dataops dataset stage to download.
- command
Character. Name or path of the
dataops_savecommand.- cache_dir
Character. Optional directory used for downloaded cfa-dataops versions. A temporary directory is used when
NULL.- force
Logical. Passed through to
dataops_save --force.- run_dataops_save
Function used to invoke the
dataops_saveCLI. The default implementation shells out viasystem2(). It is called with two arguments:command(the value of thecommandconstructor argument) andargs(a character vector built from the other constructor arguments such asdataset_namespace,stage, andforce). Override to swap in an alternative runner — for example, a different process-spawning mechanism, or a stub during testing.