Learn R Programming

lfstat (version 0.9.4)

createlfobj: Create an lfobj for further Low Flow Analysis

Description

Generic function for creating a low flow object (lfobj). Low flow objects can be created from a time series of daily flow, a data.frame with columns "flow", "day", "month" and "year".

Usage

createlfobj(x, ...)
"createlfobj"(x, hyearstart = NULL, baseflow = TRUE, meta = list(),...)
"createlfobj"(x, startdate, dateformat = "%d/%m/%Y", ...)
"createlfobj"(x, hyearstart = NULL, baseflow = NULL, meta = NULL,...)

Arguments

x
An object out of which a lfobj should be created
hyearstart
integer between 1 and 12, indicating the start of the hydrological year.
baseflow
logical, should the baseflow curve be calculated? Needed, if you want to apply 'bfplot' or 'BFI' later on.
meta
A list of meta-information
startdate
start of the time-series
dateformat
Format of the startdate
...
Additional arguments, passed on to createlfobj.data.frame.

Value

An object of class 'lfobj'.

Details

'hyearstart' defines the starting month of the hydrological year. If 'hyearstart' is greater then 6.5, the hydrological year starts earlier then the actual date, e.g. hyearstart = 10, then the 1st of October 2011 is part of the hydrological year 2012. If hyearstart = 4, then the 31st of March 2011 is part of the hydrological year 2010.

When creating an object of class lfobj with the aforementioned functions, eventually createlfobj.data.frame is called.

References

Gustard, A. & Demuth, S. (2009) (Eds) Manual on Low-flow Estimation and Prediction. Operational Hydrology Report No. 50, WMO-No. 1029, 136p.

See Also

readlfdata

Examples

Run this code
#Creating a lfobj from a timeseries
#Some sample data:

somevalues <- rexp(365)
#Convert to time series:
time <- ts(somevalues)

#Lets say our data contains values from one hydrological year (Oct-Sep)
#starting on 1. Oct. 1992:
myriver <- createlfobj(time, startdate = "01/10/1992",hyearstart = 10)
#Add meta-data
createlfobj(myriver, meta = list(river = "myriver"))

Run the code above in your browser using DataLab