Read climate data that was downloaded with dataDWD().
The data is unzipped and subsequently, the file(s) are read, processed and
returned as a data.frame / raster object.
For observational data, new users are advised to set varnames=TRUE
to obtain more informative column names.
readDWD will call internal (but documented) subfunctions depending on the
argument type, see the overview in fileType().
Not all arguments to readDWD are used for all subfunctions, e.g.
fread is used only by readDWD.data, while dividebyten
is used in readDWD.raster and readDWD.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,
type = fileType(file),
varnames = FALSE,
fread = NA,
format = NA,
tz = "GMT",
dividebyten = TRUE,
var = "",
progbar = !quiet,
quiet = rdwdquiet(),
...
)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"
Character (vector) determining which subfunction to call.
DEFAULT: fileType(file).
Logical (vector): Expand column names?
Only used in readDWD.data().
DEFAULT: FALSE (for backward compatibility)
Logical (vector): read fast? Used in readDWD.data().
DEFAULT: NA
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
var for readDWD.nc(). DEFAULT: ""
Logical: present a progress bar with estimated remaining time? If missing and length(file)==1, progbar is internally set to FALSE. DEFAULT: !quiet
Logical: suppress messages? DEFAULT: FALSE through rdwdquiet()
Further arguments passed to the internal readDWD.*
subfunctions (see fileType) and from those to the
underlying actual reading functions
For observational data, an invisible data.frame of the desired dataset, or a named list of data.frames if length(file) > 1. For gridded data, raster objects.
dataDWD(), readVars(), readMeta(), selectDWD(), fileType()
https://bookdown.org/brry/rdwd
# NOT RUN {
# see dataDWD and readDWD.* subfunctions
# }
Run the code above in your browser using DataLab