Learn R Programming

vannstats (version 1.2.1.3)

mode: Mode Function

Description

This function returns the mode for a given data frame.

Usage

mode(x, na.rm = FALSE)

Arguments

x

variable within data frame or a list of values.

na.rm

remove the NAs, default is FALSE.

Value

This function returns the mode for a variable within a data frame or a list of values.

Examples

Run this code
# NOT RUN {
data <- mtcars

mode(data$mpg)
# }

Run the code above in your browser using DataLab