rdwd (version 1.2.0)

readDWD.meta: read dwd metadata (Beschreibung*.txt files)

Description

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.

Usage

readDWD.meta(file, ...)

Arguments

file

Name of file on harddrive, like e.g. DWDdata/daily_kl_recent_KL_Tageswerte_Beschreibung_Stationen.txt

Further arguments passed to read.fwf

Value

data.frame

See Also

readDWD

Examples

Run this code
# NOT RUN {
 # Excluded from CRAN checks, but run in localtests

link <- selectDWD(res="daily", var="kl", per="r", meta=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=localtestdir(), read=FALSE)
meta <- readDWD(file)
head(meta)

cnm <- colnames(meta)
if(length(cnm)!=8) stop("number of columns should be 8, but is ", length(cnm),
                        ":\n", toString(cnm))
# }

Run the code above in your browser using DataCamp Workspace