LoadCompEvent: LoadCompEvent

View source: R/loadCompEvent.R

LoadCompEventR Documentation

LoadCompEvent

Description

Computation of loadings for event periods using individual discrete samples. Results in added columns to the event data frame that represent the event loadings in the original mass units from the concentration variable and the flow-weighted event mean concentration. maximum flow in the original flow units, volumes in the original volume units from the flow variable, and loadings in the original mass units from the concentration variable.

Usage

LoadCompEvent(
  df.samples,
  Conc,
  sample.time,
  Conc2liters,
  df.Q,
  Q,
  Q.time,
  Q2liters,
  df.events,
  event.bdate,
  event.edate
)

Arguments

df.samples

dataframe with discrete sample results and dates/times

Conc

string column name in df.samples with the concentration results

sample.time

string column name in df.samples with sample dates/times in POSIXct format

Conc2liters

numeric conversion factor that converts the concentrations to a units/liter

df.Q

dataframe with Q and date/time

Q

string name of column in dfQ with Q

Q.time

string name of column in dfQ with date/time in POSIXct format

Q2liters

numeric conversion factor that converts flow to rate per liters

df.events

dataframe with begin and end dates defining the event period

event.bdate

character string with name of variable defining beginning date for events in POSIXct format

event.edate

character string with name of variable defining end date for events in POSIXct format

Value

df.load

Examples

WQdata <- WQdata
flowData <- flowData
events <- events
LoadCompEvent(df.samples=WQdata,Conc="Total_P",sample.time="dateTime",Conc2liters=1,
df.Q=flowData,Q="Q",Q.time="pdate",Q2liters=28.3168466,
df.events=events,event.bdate="pbdate",event.edate="pedate")

USGS-R/USGSHydroTools documentation built on April 17, 2023, 8:09 p.m.