CreateData: Creates datasets that will be used in loads modelling and...

Description Usage Arguments Details Value References See Also Examples

View source: R/CreateData.R

Description

Creates a regularised flow dataset for prediction and a modelling dataset with flow metrics that can be used in regression modelling.

Usage

1
2
3
4
5
6
7
8
9
CreateData(
  Q,
  Conc,
  date.range = list(model = NULL, pred = NULL, hour = FALSE),
  samp.unit = "hour",
  Ytype = "WY",
  Qflush = 0.9,
  Reg = list(type = "ss", rainfall = NULL, date = NULL)
)

Arguments

Q

n x 2 matrix of flow (Date, Flow) where flow is measured in cumecs

Conc

$nxp$ matrix of concentrations (Date, Conc1, Conc2, ...) where concentration is measured in mg/L

date.range

list containing date ranges for modelling and prediction datasets (default: NULL)

samp.unit

sampling unit 'hour' or 'daily'

Ytype

water year "WY" or financial year "FY" (note only WY implemented at this stage)

Qflush

Qflush

Reg

Regularisation check

Details

CreateData

This function creates two datasets that are used in modelling and prediction. A third dataset is just a copy of the observed flow data.

Inputs into the function are flow and concentration datasets that have been read in using the ReadInData function or are of class "data".

Value

a list of class 'regdata' containing: CQ flow and concentration modelling dataset Qreg regularised dataset Q Observed flow matrix Standard summary and plot functions apply.

References

Kuhnert, P.M., Henderson, B.L., Lewis, S.E., Bainbridge, Z.T., Wilkinson, S.N. and Brodie, J.E. (2012) Quantifying total suspended sediment export from the Burdekin River catchment using the loads regression estimator tool, Water Resources Research, 48, W04533,doi:10.1029/2011WR011080.

See Also

ReadInData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Reading in data already stored in R
library(LRE)
burdR <- ReadInDataFromR(x.C = burdRC, x.Q = burdRQ)

# Create Dataset (no need for regularisation here as have full data)
date.rangeM <- c("1973-12-02", "2015-06-30")
date.rangeP <- c("1973-12-02", "2015-06-30")
loaddata <- CreateData(Q = burdR$Q, Conc = burdR$Conc,
                date.range = list(model = date.rangeM, pred = date.rangeP, hour = FALSE),
                samp.unit = "day", Ytype = "WY", Qflush = 0.9,
                Reg = list(type = "none", rainfall = NULL, date = NULL))
p <- plot(loaddata, Type = "WY")
summary(loaddata)

pkuhnert/LRE documentation built on March 4, 2021, 2:50 a.m.