getMetadata: Get metadata information from an XML file

Description Usage Arguments Details Value

View source: R/getMetadata.R

Description

This function reads an XML file containing a DDI codebook version 2.5 and returns the variable labels and value labels.

Usage

1
getMetadata(xmlpath, OS = "windows", saveFile = FALSE, ...)

Arguments

xmlpath

A path to an XML file with a DDI codebook

OS

The target operating system, for the eol - end of line separator

saveFile

Boolean, save an .R file in the same folder

...

Additional arguments for this function (internal uses only)

Details

The argument OS can be either:
"windows" (default), or "Windows", "Win", "win",
"MacOS", "Darwin", "Apple", "Mac", "mac",
"Linux", "linux".

The end of line separator changes only when the target OS is different from the running OS.

For the moment, only DDI version 2.5 (Codebook) is supported, but the next version will include the latest DDI version 3.2 (Lifecycle).

Value

A list containing two components "varlab" for all variable labels, and "vallab" for all value labels


DDIwR documentation built on May 2, 2019, 4:19 p.m.

Related to getMetadata in DDIwR...