add_epi_recipe | R Documentation |
epi_recipe
to a workflowAdd an epi_recipe
to a workflow
add_epi_recipe(x, recipe, ..., blueprint = default_epi_recipe_blueprint())
remove_epi_recipe(x)
update_epi_recipe(x, recipe, ..., blueprint = default_epi_recipe_blueprint())
x |
A |
recipe |
An epi recipe or recipe |
... |
Not used |
blueprint |
A hardhat blueprint used for fine tuning the preprocessing
Note that preprocessing done here is separate from preprocessing that might be done automatically by the underlying model. |
add_epi_recipe
has the same behaviour as
workflows::add_recipe()
but sets a different
default blueprint to automatically handle epiprocess::epi_df data.
x
, updated with a new recipe preprocessor.
workflows::add_recipe()
add_recipe()
specifies the terms of the model and any preprocessing that
is required through the usage of a recipe.
remove_recipe()
removes the recipe as well as any downstream objects
update_recipe()
first removes the recipe, then replaces the previous
recipe with the new one.
jhu <- covid_case_death_rates %>%
filter(time_value > "2021-08-01")
r <- epi_recipe(jhu) %>%
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7) %>%
step_epi_lag(case_rate, lag = c(0, 7, 14)) %>%
step_epi_naomit()
workflow <- epi_workflow() %>%
add_epi_recipe(r)
workflow
r2 <- epi_recipe(jhu) %>%
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7)
workflow <- update_epi_recipe(workflow, r2)
workflow <- remove_epi_recipe(workflow)
workflow
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.