# Exploration and Graphics for RivEr Trends

## Documentation for package ‘EGRET’ version 3.0.9

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Code demos. Use demo() to run them.
- Package NEWS.

## Help Pages

A B C D E F G I J L M N P Q R S T W Y

EGRET-package | EGRET package includes WRTDS and flowHistory

## -- A --

Arkansas_eList | Example eList
as.egret | Create named list for EGRET analysis

## -- B --

bin_Qs | Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Flux
blankTime | Deletes the computed values during periods of time when there are no sample data
boxConcMonth | Box plot of the water quality data by month
boxConcThree | Three box plots side-by-side
boxQTwice | Two box plots side-by-side, discharge on sample days, and discharge on all days
boxResidMonth | A box plot of WRTDS residuals by month

## -- C --

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.
censoredSegments | Generic plotting function to create censored line segments
checkStartEndDate | checkStartEndDate
checkSurfaceSpan | checkSurfaceSpan
Choptank_eList | Example eList
cleanUp | cleanUp eList
compressData | Compress sample data frame
concConst | Constants included with EGRET
concUnit-class | concUnit class
Constants | Constants included with EGRET
cumQdate | Cumulative flow calculation

## -- D --

dataOverview | Data Overview for WRTDS
dateFormatCheck | Check date format
decimalDate | decimalDate
decimalHighLow | decimalHighLow

## -- E --

errorStats | Error statistics
estCrossVal | Jack-Knife cross validation of the WRTDS (Weighted Regressions on Time, Discharge, and Season)
estDailyFromSurfaces | 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

## -- F --

fixSampleFrame | Update Sample dataframe
flexFN | Flexible Flow Normalization
flexPlotAddOn | Flexible Flow Normalization Plot Add On
flowDuration | Computes several values of the flow duration curve for streamflow centered on a specific date of the year
fluxBiasMulti | Produces 8-panel plot that is useful for determining if there is a flux bias problem
fluxBiasStat | Compute the flux bias statistic: (mean of estimated flux - mean of observed flux) / mean of estimated flux
fluxConst | Constants included with EGRET
fluxUnit-class | fluxUnit class

## -- G --

generalAxis | Axis generation for log discharge
genericEGRETDotPlot | Generic EGRET plotting function
getConcFluxFromSurface | Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Flux
getDaily | Get Daily dataframe from EGRET object
getDaily.default | Get Daily dataframe from EGRET object
getDaily.egret | Get Daily dataframe from EGRET object
getInfo | Get INFO dataframe from EGRET object
getInfo.default | Get INFO dataframe from EGRET object
getInfo.egret | Get INFO dataframe from EGRET object
getSample | Get Sample dataframe from EGRET object
getSample.default | Get Sample dataframe from EGRET object
getSurfaceEstimates | Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Flux
getSurfaces | Get surfaces matrix from EGRET object
getSurfaces.default | Get surfaces matrix from EGRET object
getSurfaces.egret | Get surfaces matrix from EGRET object

## -- I --

INFOdataframe | Import metadata to create INFO data frame
is.egret | Check for EGRET object

## -- J --

jitterSam | jitter Sample

## -- L --

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

## -- M --

makeAnnualSeries | Produces annual series of 8 streamflow statistics (and a lowess smooth of them) from daily streamflow data
makeAugmentedSample | Create randomized residuals and observations for data sets that have some censored data
makeDateInfo | makeDateInfo
mergeReport | mergeReport
modelEstimation | Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)
monthInfo | Constants included with EGRET
monthLabel-class | monthLabel class
multiPlotDataOverview | Produces a 4 panel plot that gives an overview of the data set prior to any processing

## -- N --

nCensoredVals | EGRET helper functions
nDischarge | EGRET helper functions
nObservations | EGRET helper functions

## -- P --

plot.egret | EGRET helper functions
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
plotConcHist | Graph of annual concentration and flow normalized concentration versus year
plotConcPred | Plot of Observed Concentration versus Estimated Concentration
plotConcQ | Plot of Observed Concentration versus Discharge
plotConcQSmooth | Plot up to three curves representing the concentration versus discharge relationship. Each curve is a different point in time.
plotConcTime | Plot of Observed Concentration versus Time
plotConcTimeDaily | Plot of the time series of daily concentration estimates and the sample values for the days that were sampled
plotConcTimeSmooth | Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.
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
plotFlowSingle | Creates a plot of a time series of a particular flow statistic and a loess smooth of that flow statistic
plotFluxHist | Graph of annual flux and flow normalized flux versus year
plotFluxPred | Graph of observed versus estimated flux
plotFluxQ | Sample data plot: observed log flux vs log discharge
plotFluxTimeDaily | Plot of the time series of daily flux estimates and the sample values for the days that were sampled
plotFour | Makes four graphs of streamflow statistics on a single page
plotFourStats | Makes four graphs of annual streamflow statistics on a single page
plotMonthTrend | Plot monthly trend result from runPairs
plotQTimeDaily | Plot of the discharge time series
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
plotSDLogQ | Graph of the standard deviation of the log of daily discharge versus year
plotTimeSlice | plotTimeSlice
plotWRTDSKalman | plotWRTDSKalman
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
print.egret | EGRET helper functions
printFluxUnitCheatSheet | Reminder to user of flux unit properties (such as kg/day, tons/year, etc).
printGroups | Print information about group analysis
printPairs | Print information about pairs analysis
printqUnitCheatSheet | Reminder to user of flow Unit properties such as cubic meters per second or thousands of cubic feet per second.
printSeries | Print annual results for a given streamflow statistic
processQWData | Processing of Water Quality Data

## -- Q --

qConst | Constants included with EGRET
qUnit-class | qUnit class

## -- R --

randomSubset | randomSubset
readDataFromFile | Basic Data Import for Water Flow Data
readNWISDaily | Import NWIS Daily Data for EGRET analysis
readNWISInfo | Import metadata to create INFO data frame
readNWISSample | Import NWIS Sample Data for EGRET analysis
readUserDaily | Import user daily data for EGRET analysis
readUserInfo | Import metadata to create INFO data frame
readUserSample | Import user-supplied sample data for EGRET analysis
readWQPInfo | Import metadata to create INFO data frame
readWQPSample | Import Sample Data from the Water Quality Portal for WRTDS
removeDuplicates | Remove duplicates values from Sample data frame.
runGroups | Runs a comparison of any group of years in the record.
runPairs | Runs a comparison of any two years in the record.
runSeries | Annual series of flow-normalized concentration and flow-normalized flux
runSurvReg | Run the weighted survival regression for a set of estimation points (defined by DecYear and Log(Q))
run_WRTDS | Run the weighted survival regression for a set of estimation points (defined by DecYear and Log(Q))

## -- S --

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.
selectDays | Creates a subset Daily data frame that only contains daily estimates for the specified period of analysis
setPA | Sets up the period of analysis (the portion of the year being evaluated).
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
setUpEstimation | setUpEstimation
setupYears | Creates the AnnualResults data frame from the Daily data frame
startEnd | startEnd
stitch | stitch surfaces
surfaceIndex | Compute the 6 parameters needed to lay out the grid for the surfaces computed in estSurfaces
surfaceStartEnd | Surface date limits

## -- T --

tableChange | Create a table of the changes in flow-normalized values between various points in time in the record
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
triCube | Tricube weight function

## -- W --

WRTDSKalman | WRTDS-Kalman

## -- Y --

yPretty | Sets up tick marks for an axis for a graph with an arithmetic scale which starts at zero