{
library(dplyr)
##### Example 1: use madshapR_examples provided by the package
dataset <-
madshapR_examples$`dataset_example` %>%
mutate(prg_ever = as_category(prg_ever))
head(dataset$prg_ever)
###### Example 2: any data frame can be a dataset
cat_cyl <- as_category(mtcars[['cyl']])
head(cat_cyl)
}
Run the code above in your browser using DataLab