modeFactor: Calculate modal value from factor vector

View source: R/modeFactor.R

modeFactorR Documentation

Calculate modal value from factor vector

Description

This function computes the modal value, i.e. the value that appears most often, from a factor vector.

Usage

modeFactor(v)

Arguments

v

Factor. The input vector.

Value

The modal value as character.

Author(s)

Tim Appelhans

Examples

## sample data (flights departing from Houston airports)
library(hflights)
data(hflights)

## most common flight number
modeFactor(hflights$FlightNum)
 

environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.