homlr
homlr copied to clipboard
Error in 2.1: attrition data is in a different package
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:
- Add
library(modeldata)to first code block in 2.1. - Change
rsample::attritiontoattrition.