compute_mode {mlr3misc} | R Documentation |
Compute The Mode
Description
Computes the mode (most frequent value) of an atomic vector.
Usage
compute_mode(x, ties_method = "random", na_rm = TRUE)
Arguments
x |
( |
ties_method |
( |
na_rm |
( |
Value
(vector(1)
): mode value.
Examples
compute_mode(c(1, 1, 1, 2, 2, 2, 3))
compute_mode(c(1, 1, 1, 2, 2, 2, 3), ties_method = "last")
compute_mode(c(1, 1, 1, 2, 2, 2, 3), ties_method = "random")
[Package mlr3misc version 0.15.1 Index]