homlr icon indicating copy to clipboard operation
homlr copied to clipboard

rsample::attrition does not work - Section 2.1

Open thrkng opened this issue 5 years ago • 2 comments

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

thrkng avatar Aug 19 '20 09:08 thrkng

Hi, I have the same issue with the same R version, I used the following code.

data("attrition", package = "modeldata")

m-hefnawy avatar Sep 10 '20 10:09 m-hefnawy

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.

bgreenwell avatar Sep 10 '20 13:09 bgreenwell