synth_spec <- synth_spec()
step1 <- function(x) {
x |> recipes::step_center(recipes::all_predictors(), id = "center")
}
add_custom_steps(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "steps" = step1)
)
synth_spec <- synth_spec()
step1 <- function(x) {
x |> recipes::step_center(recipes::all_predictors(), id = "center")
}
update_custom_steps(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "steps" = step1)
)
synth_spec <- synth_spec()
step1 <- function(x) {
x |> recipes::step_center(recipes::all_predictors(), id = "center")
}
synth_spec <- add_custom_steps(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "steps" = step1)
)
remove_custom_steps(synth_spec = synth_spec)
Run the code above in your browser using DataLab