Description Usage Arguments Value Examples
View source: R/stfl_calc_annual_stats.R
Compute the annualized statistics from daily data using the fasstr
routines.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | stfl_calc_annual_stats(
daily.data,
Statistic = "Mean",
water_year_start = 1,
months_in_year = 12,
roll_days = 1,
min_roll_days = c(1, 3, 7, 30),
roll_align = "right",
ignore_missing = FALSE,
STATION_NUMBER.var = "STATION_NUMBER",
Date.var = "Date",
Value.var = "Value",
Parameter.var = "Parameter"
)
|
daily.data |
Data frame (typically from the HYDAT data base) with the following fields
|
Statistic |
A vector of statistics to be computed from the daily data.
The list of available statistics is given gy |
water_year_start |
Start month for the water year. |
months_in_year |
How many months, starting from the water_year_start should be
included in the water year. These two parameters allows you, for example, to select
June - Sept with |
roll_days |
Numeric value of number of days to apply a rolling mean (default 1) before statistics are computed. |
min_roll_days |
Numeric value of number of days to apply a rolling minimum (and similar statistics) (default 1).
See |
roll_align |
Character string identify the direction of the rolling mean from the specified date.
See |
ignore_missing |
Should missing values be ignored when computing statistics. The default value of |
STATION_NUMBER.var |
Character string with the name of the variable containing the station number in the daily data and in the output results.. |
Date.var |
Character string with the name of the variable containing the date. |
Value.var |
Character string with the name of the variable containing the value to be analyzed. |
Parameter.var |
Character string with the name of the variable containing the name of the Parameter in the daily data and in the output results. |
Returns a data.frame with the following variables (sort order cannot be assumed)
STATION_NUMBERThe station number from the daily.data
ParameterThe parameter from the daily data
StatisticThe annualized statistics requested
YearThe year the annualized statistic is computed
ValueThe value of the annualized statistic
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.