powered by
A dataset created by discretizing the continuous num_data into 5 categorical levels per variable.
num_data
cat_data
A data.frame with 1000 rows and 5 variables.
Categorical version of num_data$X1, with 5 levels a–e.
num_data$X1
Categorical version of num_data$X2, with 5 levels a–e.
num_data$X2
Categorical version of num_data$X3, with 5 levels a–e.
num_data$X3
Categorical version of num_data$Z, with 5 levels a–e.
num_data$Z
Categorical version of num_data$Y, with 5 levels a–e.
num_data$Y
The R code used to generate this dataset is as follows:
data(num_data) cat_data <- as.data.frame( lapply(num_data, function(x) cut(x, breaks = 5, labels = letters[1:5])) )
data(cat_data) head(cat_data)
Run the code above in your browser using DataLab