Learn R Programming

hydroTSM (version 0.3-5)

smry: Summary

Description

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

Usage

smry(x, ...)

## S3 method for class 'default': 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:
  • MinMinimum
  • 1stQFirst quartile (lower-hinge)
  • MeanMean value
  • MedianMedian
  • 3rdQThird quartile ( upper-hinge
  • MaxMaximum of the input values.
  • IQRInterquartile Range. IQR(x) = quantile(x,3/4) - quantile(x,1/4)
  • sdStandard deviation. It uses 'n-1' as denominator.
  • cvCoefficient of variation ( cv= sd / |mean| )
  • skewnessSkewness (using e1071 package)
  • kurtosisKurtosis (using e1071 package)
  • nTotal number of elements
  • NA'sAmount of missing values

See Also

summary, fivenum, IQR, sd, skewness, kurtosis

Examples

Run this code
## 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])

Run the code above in your browser using DataLab