Learn R Programming

EGRET (version 3.0.9)

setupYears: Creates the AnnualResults data frame from the Daily data frame

Description

This function aggregates the results stored on a daily basis in the Daily data frame and stores the average values of these in the new data frame called AnnualResults. Note that the flux values are rates (kg/day) and not a mass (kg). The "annual values" can be a full 12 months, or they can be shorter. See manual to understand paLong and paStart arguments. The simplest case, a Water Year (October through September), would have paLong=12, and paStart=10. A calendar year would be paLong=12 and paStart=1. A winter season of Dec, Jan, Feb would be paLong=3 and paStart=12

Usage

setupYears(localDaily, paLong = 12, paStart = 10)

Value

A data frame 'AnnualResults' of numeric values with the following columns

NameDescriptionDecYear
Middle of the period in decimal yearsQMean discharge, in m^3/s
ConcEstimated mean concentration, in mg/LFlux
Estimated mean flux, in kg/dayFNConcFlow-normalized concentration, in mg/L
FNFluxFlow-normalized flux, in kg/dayGenConc
Generalized mean concentration, in mg/L. This column is only returned if the WRTDSKalman function was run, which gives the eList$Daily data frame a column "GenConc".GenFluxGeneralized mean flux, in kg/day. This column is only returned if the WRTDSKalman function was run, which gives the eList$Daily data frame a column "GenFlux".
PeriodLongLength of period of analysis (paLong), in monthsPeriodStart

Arguments

localDaily

data frame containing the daily values, default is Daily

paLong

numeric integer specifying the length of the period of analysis, in months, 1<=paLong<=12, default is 12

paStart

numeric integer specifying the starting month for the period of analysis, 1<=paStart<=12, default is 10

Examples

Run this code
eList <- Choptank_eList
Daily <- getDaily(eList)
AnnualResults <- setupYears(Daily, 4, 10)


Run the code above in your browser using DataLab