diff --git a/DESCRIPTION b/DESCRIPTION index 37134c160..f70ebde14 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: epipredict Title: Basic epidemiology forecasting methods -Version: 0.0.21 +Version: 0.0.22 Authors@R: c( person("Daniel", "McDonald", , "daniel@stat.ubc.ca", role = c("aut", "cre")), person("Ryan", "Tibshirani", , "ryantibs@cmu.edu", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 15aa6de29..5d1082c2b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -57,3 +57,4 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicat - Add `step_epi_slide` to produce generic sliding computations over an `epi_df` - Add quantile random forests (via `{grf}`) as a parsnip engine - Replace `epi_keys()` with `epiprocess::key_colnames()`, #352 +- Try to retain the `epi_df` class during baking to the extent possible, #376 diff --git a/R/epi_recipe.R b/R/epi_recipe.R index 0ff9efee8..2c1ffffa1 100644 --- a/R/epi_recipe.R +++ b/R/epi_recipe.R @@ -63,6 +63,7 @@ epi_recipe.default <- function(x, ...) { #' r epi_recipe.epi_df <- function(x, formula = NULL, ..., vars = NULL, roles = NULL) { + attr(x, "decay_to_tibble") <- FALSE if (!is.null(formula)) { if (!is.null(vars)) { rlang::abort( @@ -160,6 +161,7 @@ epi_recipe.formula <- function(formula, data, ...) { return(recipes::recipe(formula, data, ...)) } + attr(data, "decay_to_tibble") <- FALSE f_funcs <- recipes:::fun_calls(formula, data) if (any(f_funcs == "-")) { abort("`-` is not allowed in a recipe formula. Use `step_rm()` instead.")