SciencesPo (version 1.3.8)

Mode: Calculate the Mode

Description

Estimates the mode for a vector

Usage

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
myvar <-c(1,1,2,2,3,3,4,4,5, NA)
Mode(myvar)

Mode(myvar, FALSE)

Run the code above in your browser using DataCamp Workspace