Read climate data that was downloaded with dataDWD.
The data is unzipped and subsequently, the file is read, processed and
returned as a data.frame.
New users are advised to set varnames=TRUE to obtain more informative
column names.
readDWD will call internal (but documented) functions depending on the
arguments meta, binary, raster, multia, asc:
to read observational data: readDWD.data,
readDWD.meta, readDWD.multia
to read interpolated gridded data: readDWD.binary,
readDWD.raster, readDWD.asc
Not all arguments to readDWD are used for all functions, e.g.
fread is used only by .data, while dividebyten
is used in .raster and .asc.
file can be a vector with several filenames. Most other arguments can
also be a vector and will be recycled to the length of file.
readDWD(file, progbar = TRUE, fread = FALSE, varnames = FALSE,
format = NA, tz = "GMT", dividebyten = TRUE,
meta = grepl(".txt$", file), multia = grepl("Standort.txt$", file),
binary = grepl(".tar.gz$", file), raster = grepl(".asc.gz$", file),
asc = grepl(".tar$", file), ...)Char (vector): name(s) of the file(s) downloaded with
dataDWD,
e.g. "~/DWDdata/tageswerte_KL_02575_akt.zip" or
"~/DWDdata/RR_Stundenwerte_Beschreibung_Stationen.txt"
Logical: present a progress bar with estimated remaining time? If missing and length(file)==1, progbar is internally set to FALSE. DEFAULT: TRUE
Logical (vector): read fast? See readDWD.data.
DEFAULT: FALSE (some users complain it doesn't work on their PC)
Logical (vector): Expand column names?
See readDWD.data. DEFAULT: FALSE
Format and time zone of time stamps, see readDWD.data
Logical (vector): Divide the values in raster files by ten?
Used in readDWD.raster and readDWD.asc.
DEFAULT: TRUE
Logical (vector): is the file a meta file (Beschreibung.txt)?
See readDWD.meta.
DEFAULT: TRUE for each file ending in ".txt"
Logical (vector): is the file a multi_annual file?
Overrides meta, so set to FALSE manually if
readDWD.meta needs to be called on a file ending
with "Standort.txt". See readDWD.multia.
DEFAULT: TRUE for each file ending in "Standort.txt"
Logical (vector): does the file contain binary files?
See readDWD.binary.
DEFAULT: TRUE for each file ending in ".tar.gz"
Logical (vector): does the file contain a raster file?
See readDWD.raster.
DEFAULT: TRUE for each file ending in ".asc.gz"
Logical (vector): does the file contain asc files?
See readDWD.asc.
DEFAULT: TRUE for each file ending in ".tar"
Further arguments passed to the internal readDWD.*
functions and from those to the underlying reading functions
documented in each internal function.
Invisible data.frame of the desired dataset,
or a named list of data.frames if length(file) > 1.
readDWD.binary returns a vector,
readDWD.raster and readDWD.asc
return raster objects instead of data.frames.