Computing simple descriptive statistics of a numeric vector - not unlike what proc means of SAS does

descStat(x, na.rm = TRUE)

Arguments

x

A numeric vector

na.rm

Should missing values be removed

Value

A vector with named elements.

See also

Author

Gregor Gorjanc; gregor.gorjanc@bf.uni-lj.si

Examples


x <- c(1, 2, 3, 4, NA, NaN)
descStat(x)
#>         n       obs      mean    median        sd        cv       min       max 
#> 6.0000000 4.0000000 2.5000000 2.5000000 1.2909944 0.5163978 1.0000000 4.0000000