convertLabel | R Documentation |
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.
convertLabel(spssList, stringsAsFactors = TRUE, useZkdConvention = TRUE)
spssList |
An object created by |
stringsAsFactors |
Transform character variables into factors? |
useZkdConvention |
Logical: If |
A data.frame
.
Sebastian Weirich
file <- system.file("extdata", "Klauer.sav", package = "eatAnalysis")
dat <- foreign::read.spss(file, to.data.frame=FALSE, use.value.labels = FALSE)
dat <- convertLabel(dat)
str(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.