Mode: Sample mode

View source: R/Mode.r

ModeR Documentation

Sample mode

Description

Calculates the sample mode; i.e. the most frequent outcome in a dataset. Non-existence of the mode will return a message. Several errors in earlier versions were corrected in asbio 0.4.

Usage

Mode(x)

Arguments

x

A vector of quantitative data.

Value

Returns the sample mode or an error message if the mode does not exist.

Author(s)

Ken Aho

References

Bain, L. J., and M. Engelhardt (1992) Introduction to Probability and Mathematical Statistics. Duxbury press. Belmont, CA, USA.

See Also

H.mean, HL.mean, mean, median, huber.mu

Examples

x<-round(rnorm(100000,mean=10,sd=2),0)
Mode(x)

asbio documentation built on May 29, 2024, 5:57 a.m.