Description Usage Arguments Value Examples
Get moment statistics of a vector/array
1 | get_moments(x, order = 1:4, na.rm = FALSE)
|
x |
data |
order |
order of the moment to be computed |
na.rm |
logical. Should missing values be removed? |
a numeric vector
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.