ModeC: Most common element

View source: R/ModeC.R

ModeCR Documentation

Most common element

Description

Most common element

Usage

ModeC(
  x,
  nThread = getOption("hutilscpp.nThread", 1L),
  .range_fmatch = 1000000000,
  option = 1L
)

Arguments

x

An atomic vector.

nThread

Number of threads to use.

.range_fmatch

If the range of x differs by more than this amount, the mode will be calculated via fmatchp.

option

integer(1) Handle exceptional cases:

0

Returns NULL quietly.

1

Returns an error if the mode cannot be calculated.

2

Emits a warning if the mode cannot be calculate, falls back to hutils::Mode

Examples

ModeC(c(1L, 1L, 2L))



hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.