Skip to contents

Create 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_save command.

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_save CLI. Defaults to an internal helper that shells out via system2(). Primarily an injection seam for tests; most users should leave the default.

Value

A source object of class "cfa_dataops_source".