Skip to contents

Calculate the mode of a vector

Usage

calc_mode(y)

Arguments

y

numeric vector of values

Value

numeric scalar denoting the most frequent value

Author

Trent Henderson

Examples

y <- arima.sim(model = list(ar = 0.8), n = 1000)
outs <- get_properties(y)
#> All values occur once. Cannot compute mode. Returning NA.