This function implements generalized flow normalization. This means that for determining the flow normalized concentration and flow normalized flux for any given year, there is a specified list of years from which to create the discharge record used in the flow-normalization process. That set of years is defined by the dateInfo object.
Usage
flexFN(eList, dateInfo, localsurfaces = NA, oldSurface = FALSE,
flowNormStartCol = "flowNormStart", flowNormEndCol = "flowNormEnd",
flowStartCol = "flowStart", flowEndCol = "flowEnd")
Arguments
- eList
named list with at least the Daily, Sample, and INFO dataframes
- dateInfo
data frame with 4 columns. The column names and descriptions are described below. Default is NA.
- localsurfaces
surface (3-dimensional matrix) over-riding the one stored in eList Default = NA.
- oldSurface
logical, if TRUE, use the surface object in eList. Default is FALSE.
- flowNormStartCol
character, name of the column in dateInfo that starts the segment for the flow normalization
- flowNormEndCol
character, name of the column in dateInfo that ends the segment for the flow normalization
- flowStartCol
character, name of the column in dateInfo that starts the segment for the portion of the flow to be populated with flow-normalized values.
- flowEndCol
character, name of the column in dateInfo that ends the segment for the portion of the flow to be populated with flow-normalized values.
Examples
eList <- Choptank_eList
eList <- setUpEstimation(eList)
flowNormStart <- c("1979-10-01","1990-01-01","1992-10-10")
flowNormEnd <- c("1995-06-06","2004-03-03","2011-09-29")
flowStart <- c("1979-10-01","1995-06-07","2004-03-04")
flowEnd <- c("1995-06-06","2004-03-03","2011-09-29")
dateInfo <- data.frame(flowNormStart,
flowNormEnd,
flowStart,
flowEnd,
stringsAsFactors = FALSE)
# \donttest{
newEList <- flexFN(eList, dateInfo)
plotFluxHist(newEList)
flexPlotAddOn(newEList)
wallSurface <- estSurfaces(eList, localSample = eList$Sample[1:500,])
#> Survival regression (% complete):
#> 0 1 2 3 4 5 6 7 8 9 10
#> 11 12 13 14 15 16 17 18 19 20
#> 21 22 23 24 25 26 27 28 29 30
#> 31 32 33 34 35 36 37 38 39 40
#> 41 42 43 44 45 46 47 48 49 50
#> 51 52 53 54 55 56 57 58 59 60
#> 61 62 63 64 65 66 67 68 69 70
#> 71 72 73 74 75 76 77 78 79 80
#> 81 82 83 84 85 86 87 88 89 90
#> 91 92 93 94 95 96 97 98 99
#> Survival regression: Done
wallEList <- flexFN(eList, dateInfo, localsurface = wallSurface)
plotFluxHist(wallEList)
# }