Skip to contents

Compute the mode in a set of data values

Usage

computeMode(x, na.rm = FALSE)

Arguments

x

a vector of data

na.rm

a logical indicating whether missing values should be removed

Value

A numeric value

Examples

# Build a set of 1000 integer values between 0 and 10
x <- as.integer(runif(1000) * 10)
# Compute the mode
computeMode(x)
#> [1] 1