| readDWD.meta | R Documentation |
read dwd metadata (Beschreibung*.txt files).
Intended to be called via readDWD().
Column widths for read.fwf() are computed internally.
if(any(meta)), readDWD() tries to set the locale to German
(to handle Umlaute correctly). It is hence not recommended to call
rdwd:::readDWD.meta directly on a file!
Names can later be changed to ascii with
berryFunctions::convertUmlaut().
readDWD.meta(file, quiet = rdwdquiet(), ...)
file |
Name of file on harddrive, like e.g. DWDdata/daily_kl_recent_KL_Tageswerte_Beschreibung_Stationen.txt |
quiet |
Ignored.
DEFAULT: FALSE through |
... |
Further arguments passed to |
data.frame
Berry Boessenkool, berry-b@gmx.de
readDWD()
## Not run: # Excluded from CRAN checks, but run in localtests
link <- selectDWD(res="daily", var="kl", per="r", meta=TRUE)
link <- link[!grepl("mn4", link)] # for mn4 file May 2022
link <- grep(".txt$", link, value=TRUE)
if(length(link)!=1) stop("length of link should be 1, but is ", length(link),
":\n", berryFunctions::truncMessage(link,prefix="",sep="\n"))
file <- dataDWD(link, dir=locdir(), read=FALSE)
meta <- readDWD(file)
head(meta)
cnm <- colnames(meta)
if(length(cnm)!=9) stop("number of columns should be 9, but is ", length(cnm),
":\n", toString(cnm))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.