Skip to content

Commit db2cfee

Browse files
authored
Merge pull request #379 from cmu-delphi/retain-epi_df-class
Retain epi df class
2 parents 525618a + 9c35fb9 commit db2cfee

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: epipredict
22
Title: Basic epidemiology forecasting methods
3-
Version: 0.0.21
3+
Version: 0.0.22
44
Authors@R: c(
55
person("Daniel", "McDonald", , "[email protected]", role = c("aut", "cre")),
66
person("Ryan", "Tibshirani", , "[email protected]", role = "aut"),

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicat
5757
- Add `step_epi_slide` to produce generic sliding computations over an `epi_df`
5858
- Add quantile random forests (via `{grf}`) as a parsnip engine
5959
- Replace `epi_keys()` with `epiprocess::key_colnames()`, #352
60+
- Try to retain the `epi_df` class during baking to the extent possible, #376

R/epi_recipe.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ epi_recipe.default <- function(x, ...) {
6363
#' r
6464
epi_recipe.epi_df <-
6565
function(x, formula = NULL, ..., vars = NULL, roles = NULL) {
66+
attr(x, "decay_to_tibble") <- FALSE
6667
if (!is.null(formula)) {
6768
if (!is.null(vars)) {
6869
rlang::abort(
@@ -160,6 +161,7 @@ epi_recipe.formula <- function(formula, data, ...) {
160161
return(recipes::recipe(formula, data, ...))
161162
}
162163

164+
attr(data, "decay_to_tibble") <- FALSE
163165
f_funcs <- recipes:::fun_calls(formula, data)
164166
if (any(f_funcs == "-")) {
165167
abort("`-` is not allowed in a recipe formula. Use `step_rm()` instead.")

0 commit comments

Comments
 (0)