modalvalue: Calculate the mode of a vector, array or list.

View source: R/transform.R

modalvalueR Documentation

Calculate the mode of a vector, array or list.

Description

The mode is the most common or modal value of a list.

Usage

modalvalue(x, na.rm=FALSE)

Arguments

x

A vector, array or list.

na.rm

Whether to remove missing values.

Details

This function calculates the mode of a vector, array or list (lists are flattened). This code originated from an anonymous post on the R Wiki.


rattle documentation built on March 21, 2022, 5:06 p.m.