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

View source: R/setupYears.R

setupYearsR Documentation

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)

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

Value

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

Name Description
DecYear Middle of the period in decimal years
Q Mean discharge, in m^3/s
Conc Estimated mean concentration, in mg/L
Flux Estimated mean flux, in kg/day
FNConc Flow-normalized concentration, in mg/L
FNFlux Flow-normalized flux, in kg/day
GenConc 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".
GenFlux Generalized 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".
PeriodLong Length of period of analysis (paLong), in months
PeriodStart Starting month of period of analysis (paStart), in months (1 = January)

Examples

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



USGS-R/EGRET documentation built on Nov. 20, 2024, 7:45 p.m.