Description Usage Arguments Details Value Note References See Also Examples
These functions read in concentration
and flow data necessary for loads calculations. The two main functions
for reading in data are ReadInData
and ReadInDataFromR
. The
former function makes use of the internal ReadC
and
ReadQ
functions for reading in external text files of
concentration and flow respectively. The latter function assumes the
data have already been read in as a dataframe with two columns
(Date and concentration/flow) and will convert these into an object
suitable for analysis with
LRE
.
1 2 3 4 | ReadInData(dirnm = NULL, filenm, Cnames, OmitCzeros = FALSE, format)
ReadInDataFromR(x.C, x.Q)
ReadInDataFromR(x.C, x.Q)
|
dirnm |
The directory name where the files are stored, e.g. 'C:/Data/' |
filenm |
The name of the csv files where the concentration
and flow data are stored. This should be a name common to
both files with the extension |
Cnames |
name of concentration variable |
OmitCzeros |
a logical value indicating whether zeros should be omitted in the concentration record. If missing, it is assumed that no zeros should be omitted from the record if they exist. |
format |
date format |
x.C |
concentration dataframe |
x.Q |
flow dataframe |
The ReadInData
function reads in two comma delimited text files
using the read.csv
function. The first is a
concentration dataset containing two columns: date and concentration
measured in mg/L. The second is a flow dataset containing two columns:
date and flow measured in cumecs.
The concentration and flow files will have a name common to both and
are distinguished by a _C
for concentration and a Q
for flow. These need to be .csv files.
By default, if zeros exist in the concentration record, they will
be left in the record. If they are to be removed then the
OmitCzeros
argument will need to be set to TRUE
.
The ReadInDataFromR
function reads in two R objects that are dataframes.
The first is a concentration dataset containing two columns:
date and concentration measured in mg/L. The second is a flow
dataset containing two columns: date and flow measured in cumecs.
A list
of class 'data' containing:
Q
Observed flow dataset
Conc
Observed concentration dataset
Standard summary
and plot
functions apply.
Concentrations and flows measured in other formats will
need to be converted prior to using this function and
subsequent functions of the LRE
package.
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.
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 | # Reading in data from a file
# This function assumes you will have two csv files:
# burdR_Q.csv and burdR_C.csv representing
# flow and concentration files respectively
# The following script is not executed:
## Not run:
# Reading in data from external files
library(LRE)
burdR <- ReadInData(dirnm = "C:/Files/", filenm = "burdR",
Cnames = "TSS")
## End(Not run)
# Reading in data already stored in R
library(LRE)
burdR <- ReadInDataFromR(x.C = burdRC, x.Q = burdRQ)
plot(burdR)
summary(burdR)
hist(burdR)
## Not run:
# Reading in data from external files
library(LRE)
burdR <- ReadInData(dirnm = "C:/Files/", filenm = "burdR",
Cnames = "TSS")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.