Learn R Programming

pguIMP (version 0.0.0.3)

centralValue: centralValue

Description

Returns the central value of a variable.

Usage

centralValue(x, ws = NULL)

Arguments

x

variable

ws

weights

Value

central value

Details

Function that obtains a statistic of centrality of a variable, given a sample of values. If the variable is numeric it returns de median, if it is a factor it returns the mode. In other cases it tries to convert to a factor and then returns the mode. Taken from: https://github.com/ltorgo/DMwR2/

Examples

Run this code
# NOT RUN {
centralValue(x = seq(1,10,1))

# }

Run the code above in your browser using DataLab