Learn R Programming

evobiR (version 1.1)

Mode: Calcualtes the mode of a numeric vector

Description

R's base package function mode returns the type of object 'numeric', 'character' etc. This give the option of an easy to remember work around for that.

Usage

Mode(x)

Arguments

x
a numerical vector.

Value

returns the most frequently occuring value in a series of numbers

Details

Returns the most frequently occuring value in a vector. In the case of a tie it will return the mode which has the earliest initial occurence in the vector

References

http://coleoguy.github.io/

Examples

Run this code
Mode(c(1,2,3,4,5,6,2,5))

Run the code above in your browser using DataLab