homlr icon indicating copy to clipboard operation
homlr copied to clipboard

Error in 2.1: attrition data is in a different package

Open arencambre opened this issue 4 years ago • 0 comments

At the end of section 2.1 is a sample code block. This line does not work:

churn <- rsample::attrition %>% 
  mutate_if(is.ordered, .funs = factor, ordered = FALSE)

It returns this error: Error: 'attrition' is not an exported object from namespace:rsample`

It's failing because the attrition data was moved to modeldata. See the info for version 0.0.7 here: https://cloud.r-project.org/web/packages/rsample/news/news.html.

To fix:

  1. Add library(modeldata) to first code block in 2.1.
  2. Change rsample::attrition to attrition.

arencambre avatar Feb 16 '21 03:02 arencambre