Calculates sample skewness. A value of 0 refers to a perfectly symmetric distribution.

skewness(z, na.rm = TRUE)

Arguments

z

A numeric vector.

na.rm

Logical flag indicating whether to remove missing values or not. Default is TRUE.

Value

Numeric vector of length 1.

See also

Examples

skewness(1:10)
#> [1] 0
skewness(rexp(100))
#> [1] 2.196787