Description Usage Arguments Details Value Warning Author(s) Examples
View source: R/readDailySeries.R
The following data providers are supported:
BAFU | (Switzerland) |
BMLFUW | (Austria) |
GRDC | (Germany) |
LFUB | (Germany) |
LUBW | (Germany) |
MAPAMA | (Spain) |
MEDDE | (France) |
METSW | (Switzerland) |
1 2 |
file |
string. The full file name (can also be a regular expression). |
id |
number of string. Id of the corresponding gauge station as specified by the provider. |
provider |
string. The abbreviated name of the data provider as specified in the table above. |
series |
logical. Return the series? Otherwise, name, id, and file name are returned. |
vars |
character vector. The variables' column names in
|
The id
gets verified against the header data.
Daily regularity is not guaranteed, but throws a warning if violated.
Leading and trailing NAs get removed.
If file
is a regular expression, more than one match
results in an error.
Matrix with the daily dates in the row names; streamflow data is labelled
'qd'. If series=FALSE
a list that contains some information about
the file.
This function has been successfully used over the past few years, however, it will fail as soon as the data providers change their file structures or header formats.
Simon S
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 30 31 32 33 34 | ## Not run:
## BAFU
f <- paste0(ddir,'AllDar_Q_2490_Tagesmittel.asc')
d <- readDailySeries(file=f,id='2490',provider='BAFU')
## BMLFUW
f <- paste0(ddir,'200451.txt')
d <- readDailySeries(file=f,id='200451',provider='BMLFUW')
## GRDC
f <- paste0(ddir,'6731510.day')
d <- readDailySeries(file=f,id='6731510',provider='GRDC')
## LFUB
f <- paste0(ddir,'21516505.csv')
d <- readDailySeries(file=f,id='21516505',provider='LFUB')
## LUBW
f <- paste0(ddir,'0076275-Q.txt')
d <- readDailySeries(file=f,id='0076275',provider='LUBW')
## MAPAMA
f <- paste0(ddir,'4904.xml')
d <- readDailySeries(file=f,id='4904',provider='MAPAMA')
## MEDDE
f <- paste0(ddir,'H5920010.csv')
d <- readDailySeries(file=f,id='H5920010',provider='MEDDE')
## METSW
f <- paste0(ddir,'order36881.zip')
d <- readDailySeries(file=f,id='WIN',provider='METSW',
vars=c('rre150d0','tre200d0'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.