Prints table of change metrics for a given streamflow statistic
Source:R/tableFlowChange.R
tableFlowChange.Rd
Part of the flowHistory system.
Provides a measure of change (in real units and as percent per year)
based on the smoothed values for various streamflow statistics.
Smoothing algorithm is the same as is used in plotFlowSingle
.
Arguments
- eList
named list with at least Daily and INFO dataframes
- istat
A numeric value for the flow statistic to be graphed (possible values are 1 through 8)
- qUnit
object of qUnit class
printqUnitCheatSheet
, or numeric represented the short code, or character representing the descriptive name.- runoff
logical variable, if TRUE the streamflow data are converted to runoff values in mm/day
- yearPoints
A vector of numeric values, specifying the years at which change metrics are to be calculated, default is NA (which allows the function to set these automatically), yearPoints must be in ascending order
Details
The index of the flow statistics is istat. These statistics are: (1) 1-day minimum, (2) 7-day minimum, (3) 30-day minimum, (4) median (5) mean, (6) 30-day maximum, (7) 7-day maximum, and (8) 1-day maximum.
Can also run the statistics on any Period of Analysis (individual months or sequence of months) using setPA
.
A dataframe is returned, as well as a printout in the R console.
Examples
eList <- Choptank_eList
tableFlowChange(eList, istat = 5, yearPoints = c(1981, 1995, 2010))
#>
#> Choptank River
#> Water Year
#> mean daily
#>
#> Streamflow Trends
#> time span change slope change slope
#> cfs cfs/yr % %/yr
#> 1981 to 1995 21 1.5 19 1.4
#> 1981 to 2010 49 1.7 45 1.6
#> 1995 to 2010 28 1.9 22 1.4
eList <- setPA(eList, paStart = 4, paLong = 12)
tableFlowChange(eList, istat = 2, qUnit = 2, yearPoints = c(1981, 1995, 2010))
#>
#> Choptank River
#> Year Starting With April
#> 7-day minimum
#>
#> Streamflow Trends
#> time span change slope change slope
#> cms cms/yr % %/yr
#> 1981 to 1995 --- --- --- ---
#> 1981 to 2010 --- --- --- ---
#> 1995 to 2010 -0.036 -0.0024 -11 -0.72
#> Warning: NAs introduced by coercion
#> Warning: NAs introduced by coercion
#> Warning: NAs introduced by coercion
#> Warning: NAs introduced by coercion
eList <- setPA(eList, paStart = 9, paLong = 1)
df <- tableFlowChange(eList, istat = 5, qUnit = 2, yearPoints = c(1981, 1995, 2010))
#>
#> Choptank River
#> Season Consisting of Sep
#> mean daily
#>
#> Streamflow Trends
#> time span change slope change slope
#> cms cms/yr % %/yr
#> 1981 to 1995 0.33 0.024 46 3.3
#> 1981 to 2010 0.8 0.028 110 3.8
#> 1995 to 2010 0.47 0.031 45 3
df
#> year1 year2 change[cms] slope[cms/yr] change[%] slope[%/yr]
#> 1 1981 1995 0.33 0.024 46 3.3
#> 2 1981 2010 0.80 0.028 110 3.8
#> 3 1995 2010 0.47 0.031 45 3.0