Description Usage Format Slots Examples
In addition to storing information on the stratums and load, a number of functions are associated with the data structure.
1 |
An object of class R6ClassGenerator
of length 24.
all_valid
returns TRUE
if all underlying stratums contain sufficient concentration data
calc_stats
loops over the underlying stratums to calculate stats for entire period
rearrange_stratums
accepts a list of partition dates; moves partitions and recalculates stratum statistics
calc_loads
loops over underlying stratums and calculates the load in each
update_rmse
accepts new partitioning scheme, calculates the load, and returns the rmse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create new strata object with 3 stratums
number_of_stratums <- 3
mystrata <- strata$new( number_of_stratums, qcdata )
# create partitions to divide year into 3 roughly equal chunks (Jan-Apr, May-Aug, Sep-Dec)
mypartitions <- c( as.Date("1997-04-30"), as.Date("1997-08-31") )
# make call to rearrange stratum boundaries
# NOTE: this also copies the appropriate discharge and concentration data
# into each stratum
mystrata$rearrange_stratums( mypartitions )
# now calculate loads for each stratum and for the strata overall
mystrata$calc_loads()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.