dot-getmode function

Get the mode of a vector.

Get the mode of a vector.

This function calculates the mode of a numeric or character vector. If there are multiple modes, the first one is returned. The code is taken from an R help page.

.getmode(v)

Arguments

  • v: A numeric or character vector.

Returns

The mode of v.

Examples

.getmode(c(1, 2, 3, 3)) .getmode(c("a", "b", "b", "c"))
  • Maintainer: Kim Rand
  • License: GPL (>= 2)
  • Last published: 2024-05-21

Useful links