
It divides a numerical variable x
in classes, and returns for each class the central value.
Internal function, generally not to be called by the user.
cutnumeric( x, n = 1000 )
It returns a numerical vector. The values are the central points of classes obtained by the function cut
.
numeric vector
number of classes
Massimiliano Pastore
It calls the cut
function, and then converts factor classes in numeric classes, returning for each class its central value.
x <- rnorm(50)
cutnumeric(x,5)
Run the code above in your browser using DataLab