Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modal

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)

radiant.data

Data Menu for Radiant: Business Analytics using R and Shiny

v1.3.12
AGPL-3 | file LICENSE
Authors
Vincent Nijs [aut, cre]
Initial release
2020-11-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.