Mode: Mode Function

View source: R/Mode.R

ModeR Documentation

Mode Function

Description

This is a function that outputs a mode of a sgiven vector This is named Mode instead of mode to prevent conflict with base::mode This was taken from Stackoverflow: https://stackoverflow.com/questions/2547402/is-there-a-built-in-function-for-finding-the-mode

Usage

Mode(x, na.rm = T)

Arguments

x

The input vector to compute the mode

na.rm

Whether to remove NA values. Defaults to TRUE.

Examples

x <- c(1, 2, 2, 2, 3, 3, NA)
Mode(x)


sysilviakim/Kmisc documentation built on Jan. 28, 2023, 10:58 a.m.