homlr
homlr copied to clipboard
rsample::attrition does not work - Section 2.1
Version: Online ebook (2020-02-01)
When I run the following lines shown at the end of Section 2.1, I get an error: 'attrition' is not an exported object from 'namespace:rsample'.
# Job attrition data
churn <- rsample::attrition %>%
mutate_if(is.ordered, .funs = factor, ordered = FALSE)
Instead, the following worked in my environment.
library(modeldata)
data(attrition)
churn <- attrition %>%
mutate_if(is.ordered, .funs = factor, ordered = FALSE)
My environment is:
R version 4.0.2 (2020-06-22)
modeldata 0.0.2
rsample 0.0.7
Hi, I have the same issue with the same R version, I used the following code.
data("attrition", package = "modeldata")
Thanks @Mohamed-Hefnawy and @thrkng, it seems most data sets across the tidymodels ecosystem have moved to the modedata package. We’ll be sure to update the material when we can.