Skip to contents

A one-shot description of x: count, extremes, mean, variance, and the standard shape statistics, computed via the C# RunningStatistics class (Welford's algorithm) with no prior state. For a chunked, resumable version see running_statistics().

Usage

summary_statistics(x)

Arguments

x

numeric vector.

Value

a named numeric vector with entries n, minimum, maximum, mean, variance, sd, cv, skewness, kurtosis, and the four raw moments m1 to m4.

Examples

summary_statistics(c(2, 4, 4, 4, 5, 5, 7, 9))
#>           n     minimum     maximum        mean    variance          sd 
#>   8.0000000   2.0000000   9.0000000   5.0000000   4.5714286   2.1380899 
#>          cv    skewness    kurtosis          m1          m2          m3 
#>   0.4276180   0.8184876   0.9406250   5.0000000  32.0000000  42.0000000 
#>          m4 
#> 356.0000000