Description Usage Arguments Value Author(s) See Also Examples
View source: R/mean.river.mom.R
Calculates mean values from river inflow data. Currently, only averaging from monthly to annual means is implemented.
1 2 | ## S3 method for class 'river.mom'
mean(inData, from = inData$tstep, to = "none")
|
inData |
list containing a data.frame (in$data) with river inflow data, a character array (in$units) with corresponding units, and two character variables (in$format and in$tstep). |
from |
character: current data averaging interval; does not need to be set if in$tstep is set properly; if not, it can be manually set to e.g. 'annual', 'monthly', or 'daily' |
to |
character: future averaging interval; e.g. 'annual', 'monthly', or 'daily' |
list of newly averaged data; same structure as input data;
list containing a data.frame (out$data), a character array (out$units), and two character variables (out$format and out$tstep). The first contains the actual data formatted as a data.frame. The second contains the units to the corresponding columns of the data.frame. The third contains the source/format of data (here: 'mom'; can also be 'swat'). The fourth contains information on the time step of the data (resp.: on which time interval they are averaged).
Daniel Neumann, daniel.neumann@io-warnemuende.de
read.river.mom, write.river.append2NML, write.river.newNML, interpolate.river.mom
1 2 3 4 5 6 | # read a file:
test.mom.monthly <- read.river.mom('files/GER_Dan_Str_Warnow.dat')
# calculate annual means from monthly data
test.mom.annual <- mean.river.mom(test.mom.monthly, to = 'annual')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.