From fbceb88e9fd3307529ec5fff3ec0886592cc37c7 Mon Sep 17 00:00:00 2001 From: "Daniel J. McDonald" Date: Thu, 12 Sep 2024 15:33:59 -0700 Subject: [PATCH 1/2] try to retain the class to the extent possible --- R/epi_recipe.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/epi_recipe.R b/R/epi_recipe.R index 88ba605cd..22ecb0a31 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.") From 9cf5b8507f01397388c84d6598232aaad3f3aa8f Mon Sep 17 00:00:00 2001 From: "Daniel J. McDonald" Date: Thu, 12 Sep 2024 15:36:25 -0700 Subject: [PATCH 2/2] bump version --- DESCRIPTION | 4 ++-- NEWS.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6d1217587..a59c38327 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: epipredict Title: Basic epidemiology forecasting methods -Version: 0.0.20 +Version: 0.0.21 Authors@R: c( person("Daniel", "McDonald", , "daniel@stat.ubc.ca", role = c("aut", "cre")), person("Ryan", "Tibshirani", , "ryantibs@cmu.edu", role = "aut"), @@ -23,7 +23,7 @@ URL: https://github.com/cmu-delphi/epipredict/, https://cmu-delphi.github.io/epipredict BugReports: https://github.com/cmu-delphi/epipredict/issues/ Depends: - epiprocess (>= 0.7.5), + epiprocess (>= 0.7.12), parsnip (>= 1.0.0), R (>= 3.5.0) Imports: 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