Adding packages to the recipes required_pkgs

Hello, considering the following code:

rec <- recipe(Petal.Width ~ ., data=iris) |>
    # removes accents
    step_mutate(Species = stri_trans_general(Species, 'Latin-ASCII'))

# 'recipes'

stri_trans_general is a function from the stringi package, however since it is inside the step_mutate, recipes is not aware of the additional package dependency.

Is there a way to manually add stringi to this list of required packages ?

this is important for vetiver to known which packages to use during inference time, see the related discussion: Function not found at inference time · Issue #269 · rstudio/vetiver-r · GitHub


There's not but we can add an argument for this. I've added this issue

ah, thats a bummer, anyhow I will be watching that issue, thanks.

This topic was automatically closed 21 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.