Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Mode

Find the modal value


Description

Finds the modal value of an object (usually a factor).

Usage

Mode(x,na.rm=FALSE)

Arguments

x

An object, usually a factor.

na.rm

A dummy argument to make it compatible with calls to mean, etc.

Details

Mode finds the modal value of the object. If there are multiple modal values, it returns an appropriate message. If Mode is called with a continuous variable, it will not in general return a sensible answer. It does not attempt to estimate the density of the values and return an approximate modal value.

Value

The modal value of the object as a character string.

Note

This is not the same as mode that determines the data mode of an object.

Author(s)

Jim Lemon

See Also


prettyR

Pretty Descriptive Stats

v2.2-3
GPL (>= 2)
Authors
Jim Lemon <drjimlemon@gmail.com>, Philippe Grosjean <phgrosjean@sciviews.org>
Initial release
2019-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.