Skip to contents

By default, read.spss from the foreign package uses variable.labels as attributes of the whole data.frame, value.labels as attribute of each specific variable in the data.frame. convertLabel provides variable and value labels as variable attributes. createLabelList creates a data.frame with variable and value labels.

Usage

createLabelList(dfr, additionalAttributes = NULL)

Arguments

dfr

A data.frame with variable and value labels stored as attributes using the convention of convertLabel.

additionalAttributes

Optional: Vector of names of additional attributes which should be collected in the returned data frame.

Value

A data.frame.

Author

Sebastian Weirich

Examples

file <- system.file("extdata", "Klauer.sav", package = "eatAnalysis")
dat  <- foreign::read.spss(file, to.data.frame=FALSE, use.value.labels = FALSE)
dat  <- convertLabel(dat)
atts <- createLabelList(dat)