Skip to content

The epi_df class is dropped when using training data in bake() #87

@rachlobay

Description

@rachlobay

As noted in the discussion for the step_training_window() pull request, when using training data in bake() (that is, bake(new_data = NULL) such as in the tests for this function in particular, we now lose the epi_df class of the resulting data frame. In that case, the baked data gets demoted to a plain old tibble.

I think the issue here is that when we put new_data = NULL in bake, bake.recipe sends us to juice() and since the composition is a tibble (by default), then new_data <- tibble::as_tibble(new_data) of juice() is causing the issue (see around line 845 here). This is why I think that all was well when bake(new_data = NULL) was used along with the as_tibble.epi_df function that is no longer in use. So, as Daniel noted, we may have to create our own bake.epi_recipe() and possibly juice.epi_recipe()methods if there is no easier way to solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions