get_moments: Get moment statistics of a vector/array

View source: R/pictplot.R

get_momentsR Documentation

Get moment statistics of a vector/array

Description

Get moment statistics of a vector/array

Usage

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

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 (3rd moment) and mean (1st moment)

tsuda16k/pictplot documentation built on March 1, 2023, 8:44 p.m.