Skip to contents

Calculate the skew of a set of data

Usage

skew(x, na.rm = FALSE)

Arguments

x

a vector of observations

na.rm

remove NAs?

Value

the skew

Examples

skew(stats::rnorm(1000))
#> [1] 0.05103709
skew(stats::rbeta(1000, 1, 8)) # positively (left) skewed
#> [1] 1.524179
skew(stats::rbeta(1000, 8, 1)) # negatively (right) skewed
#> [1] -1.452606

skew(stats::rlnorm(1000))
#> [1] 4.502404