modeOfVector: Gives the mode of a vector

Description Usage Arguments Value Examples

Description

Gives the mode of a vector

Usage

1
2
modeOfVector(v_values, b_allow_several_modes = TRUE,
  b_warning_if_several_modes = TRUE)

Arguments

v_values

a vector.

b_allow_several_modes

logical default TRUE. If we want to allow more than one mode.

b_warning_if_several_modes

logical default TRUE. If we want a warning when there is more than one mode.

Value

A vector of length 1 with the mode of v_values. If there are more than one mode only one of the modes will be returned.

Examples

1
2
modeOfVector(1:10)
modeOfVector(c("a","a","b","c","c","c"))

AlejandroKantor/akmisc documentation built on May 5, 2019, 3:51 a.m.