conti2categ: transforms continuous values into a categoric values.

Description Usage Arguments Value Examples

View source: R/f0.rbsb1.code.r

Description

Transforms continuous values into a categoric values. A first step towards the discretization of numeric variables into n classes

Usage

1
conti2categ(val, lim=0, pod=c("-", "+"))

Arguments

val

vector of values to be discretized.

lim

Vector of the n-1 compulsory limits to define the n classes. When x == lim[i] it belongs to the ith class.

pod

Vector of the labels associated to the n classes. Its length provides the number of classes.

Value

the character of the resulting categoric values

Examples

1
2
3
4
 set.seed(1234);
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 conti2categ(runif(10)-0.5);
 conti2categ(runif(10), seq(0.1, 0.9, length=9), LETTERS[1:10]);

rbsb documentation built on May 2, 2019, 4:41 p.m.

Related to conti2categ in rbsb...