Learn R Programming

COINr (version 1.1.14)

skew: Calculate skewness

Description

Calculates skewness of the values of a numeric vector. This uses the same definition of skewness as the "skewness()" function in the "e1071" package where type == 2, which is equivalent to the definition of skewness used in Excel.

Usage

skew(x, na.rm = FALSE)

Value

A skewness value (scalar).

Arguments

x

A numeric vector.

na.rm

Set TRUE to remove NA values, otherwise returns NA.

Examples

Run this code
x <- runif(20)
skew(x)

Run the code above in your browser using DataLab