modus: Calculate mode.

View source: R/modus.R

modusR Documentation

Calculate mode.

Description

Generic function for mode of a sample.

Usage

modus(x, na.rm = FALSE)

Arguments

x

An R object. Currently there are methods for numeric objects.

na.rm

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

Value

The mode of x or a list of the modes of x.

Examples

modus(c(1,1,1,2,2,3,NA), na.rm = TRUE)


Kudusch/ktools documentation built on Oct. 30, 2022, 10:13 p.m.