Write Survey Data to Datalake
Usage
step_srv_write(
x,
srv_type = c("main", "final", "cleaned", "raw", "demo", "weights", "crunch", "source"),
wave = NULL,
overwrite = TRUE,
verify = TRUE,
project = g6tr.dl::dl_get_project()
)Arguments
- x
A survey tibble.
- srv_type
Type of survey data to write. One of "main", "final", "cleaned", "raw", "demo", "weights" or "crunch". "final" is main survey data plus the research-manager additions (segments, MD utilities, etc.), in the same shape as "main". This will save data to
data/srv_{srv_type}in the datalake under specified project! Defaults to "main".- wave
Optional wave name to write to. Defaults to NA, which means no wave.
- overwrite
Logical. If
FALSE, prompts before overwriting existing file. Default isTRUE.- verify
Logical. If
TRUE, reads object back after upload and checks if identical to the input. Default isTRUE.- project
Project name in the datalake. If NULL, will attempt to read from DESCRIPTION file.
Examples
if (FALSE) { # \dontrun{
data("srv_example", package = "g6tr.survey")
srv_example |> step_srv_write("main", project = "example")
} # }