get_moments | R Documentation |
Get moment statistics of a vector/array
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.