make_discrete: Make all the numeric variables of a dataframe discrete with...

Description Usage Arguments Value

Description

Make all the numeric variables of a dataframe discrete with the specified number of categories according to different algorithms (split based on quantiles or kmeans). The kmeans is chosen and if minimum differences are provided, differences inferior to the thresholds will be disregarded.

Usage

1
make_discrete(x, ncat = 2, method = "km")

Arguments

x

dataframe. database in which all numeric values have to be discretized.

ncat

integer. The number of discrete values desired for each variable (ncat = 2 makes binary variables).

method

character. Specify whether the variables should be discretized using quantiles ("qt") or kmeans ("km")

Value

A dataframe where all variables are discrete.


NicolasJBM/grpcomp documentation built on May 28, 2019, 2:21 p.m.