new_data = NULL default for bake function

juice function is superseded in the recipes package. I used it a lot. Using bake requires being explicit about new_data argument. I wonder if there is a reason not to set new_data = NULL default for bake function.

In my mind, bake() primary function is to apply changes to new data. Similarly to what predict() does. Setting new_data = NULL is a shorthand in bake() in case you have retain = TRUE. Making bake() work more like juice() is IMO not a good choice. I note that since new_data is the second argument you can do rec |> bake(NULL) which is a little shorter.

Secondly, you are fine using juice(). since it is superseded it isn't going away.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.