Learn R Programming

timeDate (version 290.83)

skewness: Skewness

Description

Functions to compute skewness.

Usage

skewness(x, ...)

## S3 method for class 'default': skewness(x, na.rm = FALSE, method = c("moment", "fisher"), ...) ## S3 method for class 'data.frame': skewness(x, \dots) ## S3 method for class 'POSIXct': skewness(x, \dots) ## S3 method for class 'POSIXlt': skewness(x, \dots)

Arguments

na.rm
a logical. Should missing values be removed?
method
a character string which specifies the method of computation. These are either "moment" or "fisher" The "moment" method is based on the definitions of skewnessfor distributions; these forms
x
a numeric vector or object.
...
arguments to be passed.

Value

  • skewness returns the value of the statistics, a numeric value. An attribute which reports the used method is added.

See Also

link{kurtosis}.

Examples

Run this code
## mean -
## var -
   # Mean, Variance:
   r = rnorm(100)
   mean(r)
   var(r)
   
## skewness -
   skewness(r)

Run the code above in your browser using DataLab