x <- rnorm(200)
table(coarsen(x))
table(coarsen(x,quantiles=TRUE))
table(coarsen(x,brackets=TRUE))
table(coarsen(x,breaks=c(-1,0,1)))
table(coarsen(x,breaks=c(-1,0,1),
range=TRUE,labels=letters[1:4]))
Run the code above in your browser using DataLab