get_moments: Get moment statistics of a vector/array

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Get moment statistics of a vector/array

Usage

1
get_moments(x, order = 1:4, na.rm = FALSE)

Arguments

x

data

order

order of the moment to be computed

na.rm

logical. Should missing values be removed?

Value

a numeric vector

Examples

1
2
3
get_moments( rnorm( 20 ) ) # get the 1st to 4th order moments
get_moments( rnorm( 20 ), order = 3 ) # get only the 3rd order moment (skewness)
get_moments( rnorm( 20 ), order = c( 3, 1 ) ) # get skewness and mean

tsuda16k/noesis documentation built on Nov. 25, 2020, 10:16 a.m.