WQcompos: Combine multiple samples into one composite sample (loads and...

View source: R/WQcompos.R

WQcomposR Documentation

Combine multiple samples into one composite sample (loads and concentrations)

Description

function to composite samples weighted by the associated volume the result is a volume-weighted concentration and summation of volumes

Usage

WQcompos(df.samples, sampleID, parms, volume = "Evolume", bdate, edate, codes)

Arguments

df.samples

dataframe with sample results and volumes

sampleID

character variable name for the IDs for compositing samples (multiple samples will have the same ID)

parms

vector Parameters to composite

volume

character variable name for the volume, defaults to "Evolume"

bdate

character variable name for the beginning of event times for each sample

edate

character variable name for the ending of event times for each sample

codes

a vector of character variable names for the values that should be pasted together into one string when combining samples (lab IDs are common here)

Value

IDdf dataframe

Examples

flowData <- flowData
FIBdata <- FIBdata
FIBcomposData <- Hydrovol(dfQ=flowData,Q="Q",time="pdate",
       df.dates=FIBdata,bdate="SSdate",edate="SEdate")
WQcompos(df.samples=FIBcomposData,sampleID="SampleID",
       parms=c("Ecoli","Enterococci"), volume="event.vol",
       bdate="SSdate",edate="SEdate",codes="SampleID")

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