# test data
x <- 1:10
# create and apply function to split x into 2 discrete levels
split_2 <- equal_discrete(2)
split_2(x)
# create and apply function to split x into 5 discrete levels
split_5 <- equal_discrete(5)
split_5(x)
Run the code above in your browser using DataLab