summaryStats {waterData} | R Documentation |
Calculate summary statistics
Description
Function to calculate summary statistics for daily hydrologic time series.
Usage
summaryStats(dataset, staid = 1)
Arguments
dataset |
is the data frame containing hydrologic data |
staid |
is used to label the output |
Format
The returned matrix has the following columns, which are formatted
for putting in a report or table.
Name | Type | Description |
Begin | character | The beginning date of the time series |
End | character | The ending date of the time series |
n | character | Number of rows |
NA | character | Number of missing values |
Neg | character | Number of negative values |
Min | character | The minimum value |
Q1 | character | The first quartile, 25th percentile |
Med | character | The median |
Mean | character | The mean |
Q3 | character | The third quartile, 75th percentile |
Max | character | The maximum value |
StdDev | character | The standard deviation |
IQR | character | The interquartile range |
Details
The summary statistics returned are useful for exploratory data analysis and for describing the date set.
Value
a data frame containing a number of summary statistics of the daily hydrologic data series
Note
Hydrologic data are often skewed (Helsel and Hirsch, 2002). Summary statistics help describe the degree of skewness and help to determine the degree of applicability of hypothesis tests. Some data, in particular streamflow, may need to be transformed to produce approximately normal data.
References
Helsel, D.R. and Hirsch, R. M., 2002, Statistical methods in water resources: U.S. Geolgical Survey Techniques of Water Resources Investigations, book 4, chap. A3, 522 p. (Also available at http://pubs.usgs.gov/twri/twri4a3/).
Examples
data(exampleWaterData)
summaryStats(pH05082500, staid="05082500")