# NOT RUN {
# Generate data for the example
heartfailure2 <- heartfailure
heartfailure2[sample(seq(NROW(heartfailure2)), 20), "platelets"] <- NA
# Binning the carat variable. default type argument is "quantile"
bin <- binning(heartfailure2$platelets, nbins = 5)
plot(bin)
# Using another type arguments
bin <- binning(heartfailure2$platelets, nbins = 5, type = "equal")
plot(bin)
#bin <- binning(heartfailure2$platelets, nbins = 5, type = "pretty")
#plot(bin)
#bin <- binning(heartfailure2$platelets, nbins = 5, type = "kmeans")
#plot(bin)
bin <- binning(heartfailure2$platelets, nbins = 5, type = "bclust")
plot(bin)
# }
Run the code above in your browser using DataLab