modal {radiant.data}R Documentation

Calculate the mode (modal value) and return a label

Description

Calculate the mode (modal value) and return a label

Usage

modal(x, na.rm = TRUE)

Arguments

x

A vector

na.rm

If TRUE missing values are removed before calculation

Details

From https://www.tutorialspoint.com/r/r_mean_median_mode.htm

Examples

modal(c("a", "b", "b"))
modal(c(1:10, 5))
modal(as.factor(c(letters, "b")))
modal(runif(100) > 0.5)


[Package radiant.data version 1.6.6 Index]