Skip to contents

Extended summary function for numeric objects, with 13 summary statistics.

Usage

smry(x, ...)

# S3 method for default
smry(x, na.rm=TRUE, digits = max(3, getOption("digits")-3), ...)

# S3 method for zoo
smry(x, na.rm=TRUE, digits = max(3, getOption("digits")-3), ...)

# S3 method for Date
smry(x, na.rm=TRUE, digits = max(3, getOption("digits")-3), ...)

# S3 method for matrix
smry(x, na.rm=TRUE, digits = max(3, getOption("digits")-3), ...)

# S3 method for data.frame
smry(x, na.rm=TRUE, digits = max(3, getOption("digits")-3), ...)

Arguments

x

a numeric object, vector, matrix or data.frame, for which a summary is desired.

na.rm

a logical value indicating whether 'NA' values should be stripped before the computation proceeds.

digits

numeric, with the amount of decimal places to be included in the result

...

further arguments passed to or from other methods.

Value

Computed summary statistics are:

Min

Minimum

1stQ

First quartile (lower-hinge)

Mean

Mean value

Median

Median

3rdQ

Third quartile ( upper-hinge

Max

Maximum of the input values.

IQR

Interquartile Range. IQR(x) = quantile(x,3/4) - quantile(x,1/4)

sd

Standard deviation. It uses 'n-1' as denominator.

cv

Coefficient of variation ( cv= sd / |mean| )

skewness

Skewness (using e1071 package)

kurtosis

Kurtosis (using e1071 package)

n

Total number of elements

NA's

Amount of missing values

Author

Mauricio Zambrano-Bigiarini mzb.devel@gmail

Note

Skewness and Kurtosis are computed with the e1071 package

Examples

## Loading the monthly time series of precipitation within the Ebro River basin.
data(EbroPPtsMonthly)

## Summary of monthly precipitation values for the first 7 stations in 'EbroPPtsMonthly'
smry(EbroPPtsMonthly[,2:8])