Mode: Mode

View source: R/Mode.R

ModeR Documentation

Mode

Description

Function to compute the mode. Supports numeric, character, and factor variables.

Usage

Mode(x, na.rm = FALSE)

Arguments

x

An R object. Currently supports numeric, character, and factor vectors.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

References

This solution was written by Ken Williams and adapted by Gregor Thomas. It comes from this post on Stack Overflow.


leonidliu/liutils documentation built on Aug. 3, 2024, 4:57 p.m.