modalvalue: Return the value which represents the mode

Description Usage Arguments Value

View source: R/sharedSupport.r

Description

Jason rewrote on 2011-11-02 and changed the test to reflect that the mode will always be the smallest value if there are ties. One test value returned 7 for a case with a 7 and 2 with three values each.

Usage

1
modalvalue(x, na.rm = FALSE)

Arguments

x

vector of values of interest

na.rm

if TRUE, will remove NA values from consideration

Value

the value of the mode


jasonelaw/nrsa documentation built on Nov. 8, 2019, 11:34 a.m.