Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

overlapping (version 1.2)

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)

Arguments

x
numeric vector
n
number of classes

Value

  • It returns a numerical vector, in which values are the central points of classes obtained by the function cut.

Details

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

See Also

cut

Examples

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

Run the code above in your browser using DataLab