skewness: Sample Skewness

View source: R/skewness.R

skewnessR Documentation

Sample Skewness

Description

skewness returns the sample skewness of a data vector/matrix

Usage

skewness(x, skew.type = NULL, na.rm = FALSE)

Arguments

x

A data vector/matrix

skew.type

The type of skewness statistic used ('Moment', 'Fisher Pearson' or 'Adjusted Fisher Pearson')

na.rm

Logical value; if TRUE the function removes NA values

Details

This function computes the sample skewness for a data vector or matrix. For a vector input the function returns a single value for the sample skewness of the data. For a matrix input the function treats each column as a data vector and returns a vector of values for the sample skewness of each of these datasets. The function can compute different types of skewness statistics using the skew.type input.

Value

The sample skewness of the data vector/matrix

Examples


skewness(rnorm(1000))
skewness(rexp(1000))


utilities documentation built on July 1, 2022, 9:06 a.m.