mean.numerics {DTwrappers2}R Documentation

mean.numerics

Description

This function computes the mean value of a numeric, integer, logical, or complex vector. If the vector is not one of these types, the function returns either NA or the first entry of the vector.

Usage

## S3 method for class 'numerics'
mean(x, na.rm = TRUE, non.numeric.value = "missing", ...)

Arguments

x

A vector.

na.rm

A logical value specifying whether missing values should be removed from the calculations specified by the function. Defaults to TRUE.

non.numeric.value

If "missing", returns NA for variables that are not numeric, integer, logical, or complex. Otherwise, returns the first entry of the vector. Defaults to "missing".

...

Additional arguments.

Value

If x is numeric, integer, logical, or complex, the mean value will be computed. Otherwise, the first value of x will be returned untouched or NA based on non.numeric.value.


[Package DTwrappers2 version 0.0.3 Index]