Skip to contents

Calculate the mode of a provided vector

Usage

modal(x, na.rm = TRUE)

Arguments

x

A vector of values or characters.

na.rm

logical whether NA values are to be removed (Default: TRUE)

Value

The most common (mode) estimate.

Examples

# Example
modal(trees$Girth)
#> Error: unable to find an inherited method for function ‘modal’ for signature ‘x = "numeric"’