moda {dprep} | R Documentation

## Calculating the Mode

### Description

This function calculates the mode of a vector

### Usage

    moda(x, na.rm = TRUE)

### Arguments

`x` | a numeric vector
`na.rm` | boolean value that indicates the presence of missing values.

### Details

The function returns the mode or modes of a vector. If a tie exists, all values that are tied are returned.

### Value

`moda` | a numeric value representing the mode of the vector

### Author(s)

Caroline Rodriguez and Edgar Acuna

### Examples

    #---- Calculating the mode ----
    x=c(1,4,2,3,4,6,3,7,8,5,4,3)
    moda(x)

[Package dprep version 1.0 Index]