Skip to contents

Import Data

Functions for user-generated or web retrieval data.

readUserDaily()
Import user daily data for EGRET analysis
readUserSample()
Import user-supplied sample data for EGRET analysis
readNWISDaily()
Import NWIS Daily Data for EGRET analysis
readNWISSample()
Import NWIS Sample Data for EGRET analysis
readWQPSample()
Import Sample Data from the Water Quality Portal for WRTDS
readNWISInfo() readWQPInfo() readUserInfo()
Import metadata to create INFO data frame

WRTDS

Functions working running and analyzing the WRTDS model

modelEstimation()
Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)
setUpEstimation()
setUpEstimation
WRTDSKalman()
WRTDS-Kalman
runPairs()
Runs a comparison of any two years in the record.
runGroups()
Runs a comparison of any group of years in the record.
runSeries()
Annual series of flow-normalized concentration and flow-normalized flux
runSurvReg() run_WRTDS()
Run the weighted survival regression for a set of estimation points (defined by DecYear and Log(Q))
estCrossVal()
Jack-Knife cross validation of the WRTDS (Weighted Regressions on Time, Discharge, and Season)
estDailyFromSurfaces() getConcFluxFromSurface() getSurfaceEstimates() bin_Qs()
Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Flux
estSurfaces()
Estimate the three surfaces (for yHat, SE and ConcHat) as a function of DecYear and logQ and store in the three-dimensional object called surfaces
flexFN()
Flexible Flow Normalization

Plot Data

Functions for plotting eList objects

multiPlotDataOverview()
Produces a 4 panel plot that gives an overview of the data set prior to any processing
plotFlowSingle()
Creates a plot of a time series of a particular flow statistic and a loess smooth of that flow statistic
plotFluxQ()
Sample data plot: observed log flux vs log discharge
plotFour()
Makes four graphs of streamflow statistics on a single page
plotFourStats()
Makes four graphs of annual streamflow statistics on a single page
plotQTimeDaily()
Plot of the discharge time series
plotSDLogQ()
Graph of the standard deviation of the log of daily discharge versus year
boxConcMonth()
Box plot of the water quality data by month
boxQTwice()
Two box plots side-by-side, discharge on sample days, and discharge on all days
plotConcTime()
Plot of Observed Concentration versus Time
plotConcQ()
Plot of Observed Concentration versus Discharge
boxConcThree()
Three box plots side-by-side
plot15()
Makes 15 graphs of streamflow statistics on a single page. These encompass the 7-day minimum, mean, and 1-day maximum for each of the following 5 Periods of Analysis: Annual, Fall, Winter, Spring and Summer.
plot1of15()
plots 1 of the 15 graphs of streamflow statistics on a single page

Plot Model Outputs

Functions for plotting modeled eList objects

plotConcPred()
Plot of Observed Concentration versus Estimated Concentration
plotFluxPred()
Graph of observed versus estimated flux
plotResidPred()
Plot of the residuals from WRTDS versus the estimated values (all in log concentration units)
plotResidQ()
Plot of the residuals from WRTDS (in log concentration units) versus the discharge
plotResidTime()
Plot of the residuals from WRTDS (in log concentration units) versus time
boxResidMonth()
A box plot of WRTDS residuals by month
plotConcHist()
Graph of annual concentration and flow normalized concentration versus year
plotFluxHist()
Graph of annual flux and flow normalized flux versus year
plotFluxTimeDaily()
Plot of the time series of daily flux estimates and the sample values for the days that were sampled
plotConcTimeDaily()
Plot of the time series of daily concentration estimates and the sample values for the days that were sampled
plotConcQSmooth()
Plot up to three curves representing the concentration versus discharge relationship. Each curve is a different point in time.
plotConcTimeSmooth()
Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.
fluxBiasMulti()
Produces 8-panel plot that is useful for determining if there is a flux bias problem
plotContours()
Color contour plot of the estimated surfaces as a function of discharge and time (surfaces include log concentration, standard error, and concentration)
plotDiffContours()
Plots the difference between two years from a contour plot created by plotContours
plotWRTDSKalman()
plotWRTDSKalman
plotTimeSlice()
plotTimeSlice
plotMonthTrend()
Plot monthly trend result from runPairs
flexPlotAddOn()
Flexible Flow Normalization Plot Add On
genericEGRETDotPlot()
Generic EGRET plotting function
generalAxis()
Axis generation for log discharge
logPretty1()
Sets up tick marks for an axis with a log scale, where the graph is small
logPretty3()
Sets up tick marks for an axis with a log scale

Table

Functions for creating tables from eList objects

printSeries()
Print annual results for a given streamflow statistic
makeAnnualSeries()
Produces annual series of 8 streamflow statistics (and a lowess smooth of them) from daily streamflow data
tableChange() tableChangeSingle()
Create a table of the changes in flow-normalized values between various points in time in the record
tableFlowChange()
Prints table of change metrics for a given streamflow statistic
tableResults()
Table of annual results for discharge, concentration and flux
setupYears()
Creates the AnnualResults data frame from the Daily data frame
calculateMonthlyResults()
Calculates monthly mean values of Q, Conc, FNConc, Flux, and FNFlux for the entire record. If WRTDSKalman has been run it also includes the monthly mean values of GenConc and GenFlux.

Utilities

Additional utility functions

blankTime()
Deletes the computed values during periods of time when there are no sample data
cleanUp()
cleanUp eList
compressData()
Compress sample data frame
cumQdate()
Cumulative flow calculation
dataOverview()
Data Overview for WRTDS
decimalDate()
decimalDate
errorStats()
Error statistics
fixSampleFrame()
Update Sample dataframe
flowDuration()
Computes several values of the flow duration curve for streamflow centered on a specific date of the year
fluxBiasStat()
Compute the flux bias statistic: (mean of estimated flux - mean of observed flux) / mean of estimated flux
printPairs()
Print information about pairs analysis
printGroups()
Print information about group analysis
getDaily()
Get Daily dataframe from EGRET object
getInfo()
Get INFO dataframe from EGRET object
getSample() getSample() getSample.default()
Get Sample dataframe from EGRET object
getSurfaces()
Get surfaces matrix from EGRET object
jitterSam()
jitter Sample
makeAugmentedSample()
Create randomized residuals and observations for data sets that have some censored data
mergeReport()
mergeReport
print(<egret>) plot(<egret>) nDischarge() nObservations() nCensoredVals()
EGRET helper functions
printFluxUnitCheatSheet()
Reminder to user of flux unit properties (such as kg/day, tons/year, etc).
printqUnitCheatSheet()
Reminder to user of flow Unit properties such as cubic meters per second or thousands of cubic feet per second.
processQWData()
Processing of Water Quality Data
randomSubset()
randomSubset
removeDuplicates()
Remove duplicates values from Sample data frame.
saveResults()
A utility program for saving the contents of the workspace This function saves the workspace. Future versions of EGRET will not include this function, use saveRDS to save individual eList objects. It assigns the file a name using the abbreviations for station and constituent.
setPA()
Sets up the period of analysis (the portion of the year being evaluated).
stitch()
stitch surfaces
triCube()
Tricube weight function
censoredSegments()
Generic plotting function to create censored line segments
checkStartEndDate()
checkStartEndDate
checkSurfaceSpan()
checkSurfaceSpan
Constants fluxConst qConst monthInfo concConst
Constants included with EGRET
dateFormatCheck()
Check date format
decimalHighLow()
decimalHighLow
makeDateInfo()
makeDateInfo
populateConcentrations()
Populate Concentration Columns
populateDaily()
Populate Daily data frame
populateDailySamp()
Merge concentration to Daily
populateDateColumns()
Populate Date Columns
populateParameterINFO()
Populate Parameter Information Columns
populateSampleColumns()
Populate Sample Columns
populateSiteINFO()
Populate Site Information Columns
qUnit-class
qUnit class
concUnit-class
concUnit class
readDataFromFile()
Basic Data Import for Water Flow Data
Choptank_eList Arkansas_eList
Example eList
selectDays()
Creates a subset Daily data frame that only contains daily estimates for the specified period of analysis
setSeasonLabel()
Create a character variable that describes the period of analysis, when period of analysis has already been set in AnnualResults
setSeasonLabelByUser()
Creates a character variable that describes the period of analysis, when the period of analysis is being set by the user and not from AnnualResults
startEnd()
startEnd
surfaceIndex()
Compute the 6 parameters needed to lay out the grid for the surfaces computed in estSurfaces
surfaceStartEnd()
Surface date limits
yPretty()
Sets up tick marks for an axis for a graph with an arithmetic scale which starts at zero
monthLabel-class
monthLabel class
is.egret()
Check for EGRET object
as.egret()
Create named list for EGRET analysis
EGRET-package
EGRET package includes WRTDS and flowHistory
fluxUnit-class
fluxUnit class