Learn R Programming

lfstat (version 0.9.12)

readlfdata: Reads data sheets

Description

Reads data sheets of different formats directly and returns objects of class 'lfobj'.

Usage

readlfdata(file, type = c("GRDC", "HZB", "LFU", "TU"), lfobj = TRUE,
           readmeta = TRUE, encoding = NULL, ...)

Value

A 'lfobj' or 'data.frame' depending on 'lfobj'.

Arguments

file

The name of the file which the data are to be read from.

type

The style of the sheet, currently the following formats are accepted: 'GRDC', 'HZB' (Austria), 'LFU' (Germany, Bavaria), 'TU' (Technical University Vienna)

lfobj

logical, should a low flow object be created?

readmeta

logical, should meta information from data sheets be saved?

encoding

The name of the encoding to be assumed. See the Encoding section of connections.

...

Handed to 'createlfobj', could be 'hyearstart', 'baseflow' or 'meta', if 'readmeta' is 'FALSE'.

Author

Daniel Koffler and Gregor Laaha

References

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

See Also

createlfobj

Examples

Run this code
# Finding the filename of the sample file on your computer
fn <- system.file("samplesheets/9104020.day", package = "lfstat")
grdc <- readlfdata(fn, type = "GRDC", baseflow = FALSE, hyearstart = 1)
head(grdc)


fn <- system.file("samplesheets/kloesterle.dat", package = "lfstat")
hzb <- readlfdata(fn, type = "HZB", baseflow = FALSE, hyearstart = 1)
head(hzb)

fn <- system.file("samplesheets/oberammergau.dat", package = "lfstat")
lfu <- readlfdata(fn, type = "LFU", baseflow = FALSE, hyearstart = 1)
head(lfu)

Run the code above in your browser using DataLab