smry: Summary

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/smry.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
smry(x, ...)

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

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

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

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

## S3 method for class '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

Note

Skewness and Kurtosis are computed with the e1071 package

Author(s)

Mauricio Zambrano-Bigiarini [email protected]

See Also

summary, fivenum, IQR, sd, skewness, kurtosis

Examples

1
2
3
4
5
## 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])

hydroTSM documentation built on Aug. 8, 2017, 1:03 a.m.