50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

overlapping (version 1.8)

cutnumeric: Numerical conversion

Description

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.

Usage

cutnumeric( x, n = 1000 )

Value

It returns a numerical vector. The values are the central points of classes obtained by the function cut.

Arguments

x

numeric vector

n

number of classes

Author

Massimiliano Pastore

Details

It calls the cut function, and then converts factor classes in numeric classes, returning for each class its central value.

See Also

Examples

Run this code
x <- rnorm(50)
cutnumeric(x,5)


Run the code above in your browser using DataLab