modeFactor: Calculate modal value from factor vector

Description Usage Arguments Value Author(s) Examples

View source: R/modeFactor.R

Description

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

Usage

1

Arguments

v

Factor. The input vector.

Value

The modal value as character.

Author(s)

Tim Appelhans

Examples

1
2
3
4
5
6
7
## sample data (flights departing from Houston airports)
library(hflights)
data(hflights)

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

environmentalinformatics-marburg/Rsenal documentation built on Sept. 23, 2018, 5:17 a.m.