Learn R Programming

SciencesPo (version 0.11.21)

get.mode: Estimates mode

Description

Estimates the mode in a vector

Usage

get.mode(x, na.rm = FALSE)

Arguments

x
A data vector.
na.rm
A logical value, default is FALSE.

encoding

UTF-8

Examples

Run this code
vec <-c(1,1,2,2,3,3,4,4,5, NA)
get.mode(vec, na.rm = TRUE)

Run the code above in your browser using DataLab