discr: A Function Discretize a Vector of Numeric

View source: R/utils.R

discrR Documentation

A Function Discretize a Vector of Numeric

Description

Takes a vector v of numeric. Replaces the values of v by integers in (1:nd), according to values of breaks (increasing vector of numeric). If breaks is missing, nd regular quantiles are taken.

Usage

discr(v, nd = 5, breaks)

Arguments

v

A vector of numeric.

nd

The number of classes.

breaks

An increasing vector of numeric.

Value

A vector of factors.


fchuffar/epimedtools documentation built on Feb. 3, 2024, 2:21 a.m.