Problem with tidymodels model workflow using hardhat 0.1.5: Error: 'arg_match0' is not an exported object from 'namespace:rlang'

I had some functions in a package that stopped working the other day; and have now found that the problems appear to be with hardhat versions. My package does not have hardhat as an explicit dependency (i.e., hardhat is a dependency of one of my package's dependency)

The exmple code below works fine when using hardhat_0.1.4.tar.gz but with the new version of hardhat on CRAN it gives this error:

Error: 'arg_match0' is not an exported object from 'namespace:rlang'


x1 <- runif(40)
x2 <- runif(40)
x3 <- runif(40)
y <- runif(40)
data_train1 <- tibble(x1, x2, x3, y)

xy_recipe <- data_train1 %>%
  recipes::recipe(y ~ .)

# Create and fit model
mod_spec <- parsnip::linear_reg(penalty = 1, mixture = 1) %>%

# Create Workflow (to know variable roles from recipes) help(workflow)
wf <- workflows::workflow() %>%
  workflows::add_model(mod_spec) %>%

# Fit model
mod <-  parsnip::fit(wf, data = data_train1)

# To install hardhat_0.1.4.tar.gz
PackageUrl <- ""
install.packages(PackageUrl, repos=NULL, type="source")

What version of rlang do you have? (load the package then use sessionInfo()). That function was added in version 0.4.7.

You can reinstall rlang to ge the latest version (if needed).

1 Like

Great: thank you ever so much Max!

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