Mode {petersenlab} | R Documentation |
Statistical Mode.
Description
Calculate statistical mode.
Usage
Mode(x, multipleModes = "all")
Arguments
x |
Numerical vector. |
multipleModes |
How to handle multiple modes. One of:
|
Details
Calculates statistical mode(s).
Value
Statistical mode(s).
See Also
https://stackoverflow.com/questions/2547402/how-to-find-the-statistical-mode/8189441#8189441
Other computations:
meanSum()
,
mySum()
Examples
# Prepare Data
v1 <- c(1, 1, 2, 2, 3)
#Calculate Statistical Mode
Mode(v1)
Mode(v1, multipleModes = "mean")
Mode(v1, multipleModes = "first")
[Package petersenlab version 1.0.0 Index]