This function operates only on vectors or their subsets, by calculating a descriptive statistic specified in fn
argument.
univar(x, subset = NULL, fn, na.rm = TRUE, ...)
a numeric variable to be summarised
an expression that evaluates to logical vector (defaults to NULL
, in which case the function specified in fun
is applied on a vector)
a function or a function name to be applied on a variable or it's subset
a logical value indicating whether NA
's should be removed (defaults to TRUE
)
additional arguments for function specified in fn
a numeric