
Bake steps Applies all steps in a survey workflow to a Survey or RotativePanelSurvey object.
Source:R/Step.R
bake_steps.Rd
Bake steps Applies all steps in a survey workflow to a Survey or RotativePanelSurvey object.
Details
This function iterates through all the steps defined in the survey object and applies them sequentially. If the object is a RotativePanelSurvey, it processes both the implantation and follow-up surveys.
Examples
svy <- Survey$new(data = data.frame(var1 = 1:10, var2 = 11:20))
#> Error in initialize(...): argument "edition" is missing, with no default
step1 <- Step$new(name = "step1", edition = "2023", survey_type = "example_survey", type = "compute", new_var = "var3", exprs = list(var3 = var1 + var2), call = NULL, svy_before = NULL, default_engine = NULL, depends_on = list("var1", "var2"), comments = "Compute var3", bake = FALSE)
#> Error: object 'var1' not found
svy$steps <- list(step1)
#> Error: object 'step1' not found
svy <- bake_steps(svy)
#> Error: object 'svy' not found
print(svy$data)
#> Error: object 'svy' not found