calculate_mode: Calculate Mode

calculate_modeR Documentation

Calculate Mode

Description

calculate_mode is a generic function to compute the most abundant element in a list.

Usage

calculate_mode(x, ...)

## Default S3 method:
calculate_mode(x, na.rm = FALSE, ...)

Arguments

x

An R object. Currently there are methods for numeric/logical vectors and date, date-time and time interval objects. Complex vectors are allowed for trim = 0, only.

na.rm

a logical evaluating to TRUE or FALSE indicating whether NA values should be stripped before the computation proceeds.

...

further arguments passed to or from other methods.

Value

the most frequent value.

References

https://stackoverflow.com/a/8189441

See Also

[mean()] [median()] [sd()] [summary()]


TomKellyGenetics/tktools documentation built on July 6, 2024, 5:44 a.m.