butcher icon indicating copy to clipboard operation
butcher copied to clipboard

R_emptyEnv for Recipe formula class?

Open edwinschut opened this issue 5 years ago • 3 comments

When we use butcher on an object of class ”Recipe" the environment for the “formula” class is set to < R_EmptyEnv>. The recipe is also used in a production chain for preprocessing the data (i.e. "feature engineering"). With a < R_EmptyEnv> this isn’t working any more.

Is it possible to set this environment to current_env() or to make it a parameter option?

edwinschut avatar Sep 27 '19 12:09 edwinschut

This seems a Duplicate of #134

LeenSonneveld avatar Sep 27 '19 13:09 LeenSonneveld

Thank you! Let me know if the recent fix in this dev version works

jyuu avatar Sep 27 '19 14:09 jyuu

Thanks for the update! For a basic use case it’s ok, but we prefer a change to current_env instead of base_env.
We use, for example, the function year from the lubridate package inside the recipe; with base_env this results in an error because the environment stack doesn’t included the current packages.

edwinschut avatar Sep 30 '19 11:09 edwinschut

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

github-actions[bot] avatar Mar 21 '23 01:03 github-actions[bot]