layer_naomit | R Documentation |
NA
s from predictions or other columnsOmit NA
s from predictions or other columns
layer_naomit(frosting, ..., id = rand_id("naomit"))
frosting |
a |
... |
< |
id |
a random id string |
an updated frosting
postprocessor
jhu <- covid_case_death_rates %>%
filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
r <- epi_recipe(jhu) %>%
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7)
wf <- epi_workflow(r, linear_reg()) %>% fit(jhu)
f <- frosting() %>%
layer_predict() %>%
layer_naomit(.pred)
wf1 <- wf %>% add_frosting(f)
p <- forecast(wf1)
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.