moda: Computes the mode

View source: R/moda.r

modaR Documentation

Computes the mode

Description

Computes the mode of a random variable.

Usage

moda(y = y)

Arguments

y

is a numeric vector.

Details

The mode is an statistics representing the most "used" value of the random variable as a way of central position.

Value

The function returns the mode, a numeric scalar.

Author(s)

Christian Salas-Eljatib.

Examples


set.seed(1234)
variable <- rnorm(10, mean=45,sd=6)
#using the function
moda(y=variable)
moda(variable)

datana documentation built on June 13, 2025, 1:11 a.m.