findMode: Find the mode for a vector

Description Usage Arguments See Also

Description

Calculates the mode for integer, real, character, and logical vectors. In the event of a tie, a winner is chosen at random (using C's rand(), so not affected by set.seed(), sorry!).

Usage

1
findMode(x, na.rm = FALSE)

Arguments

x

An integer, real, character, or logical vector

na.rm

Logical. If TRUE, NA cells are removed.

See Also

Intended to be a faster, less flexible replacement for raster::modal.


jcheng5/rasterfaster documentation built on May 18, 2019, 10:22 p.m.