calc_mode: Calculate mode

View source: R/data_prep_functions.R

calc_modeR Documentation

Calculate mode

Description

Funnily enough, R doesn't have a mode, so this is it. Be careful because ties just return whichever is the furthest to the beginning of the vector with no warning given

Usage

calc_mode(v)

Arguments

v

Vector of numerical values

Value

number- mode of the supplied vector


CDU-data-science-team/phaRmacyForecasting documentation built on Jan. 2, 2023, 5:56 p.m.