Learn R Programming

ck37r (version 1.0.3)

Mode: Compute the mode of a vector (can be multiple results).

Description

Via http://stackoverflow.com/questions/2547402/is-there-a-built-in-function-for-finding-the-mode

Usage

Mode(x, exclude_na = TRUE)

Arguments

x

vector

exclude_na

Exclude NA from being a possible mode.

Value

Vector of modal values in arbitrary order.

Examples

Run this code
# NOT RUN {
library(ck37r)

data(Boston, package = "MASS")

table(Boston$chas)

Mode(Boston$chas)

# }

Run the code above in your browser using DataLab