Mode: Derive the modal value(s) for a set of data

Description Usage Arguments Value Warning Examples

View source: R/Mode.R

Description

This function takes a vector and returns one or mode values that represent the mode point of the data

Usage

1
Mode(x)

Arguments

x

a vector

Value

a vector containing one or more modal values for the input vector

Warning

Be careful the function does some basic error checking but the return to Mode(NA) is NA and a vector where the majority of entries are NA is also NA

Examples

1
2
3
Mode(sample(1:100, 1000, replace = TRUE))
Mode(mtcars$hp)
Mode(iris$Sepal.Length)

ibecav/CGPfunctions documentation built on Nov. 17, 2020, 5:08 a.m.