I have a .sav
file from SPSS which contains data from a survey conducted by means of a questionnaire. I tried to open this .sav
file in R, but I have a problem with replicating the structure of the original data file. It means that in the original data file there are variables which have values and labels, for ex. variable "satisfaction with XY" has values "1" "2" and "3" with corresponding labels 1 = "satisfied", 2 = "both satisfied and unsatisfied" and 3 = "unsatisfied".
I found out that through the package "memisc" I can replicate this structure by creating "item" variables. The code looks like this:
labels(data$XY) <- c("satisfied" = 1,
"both satisfied and unsatisfied" = 2,
"unsatisfied" = 3)
What i don't know is how to apply this to all of the variables i select (not just to one and not to all of the variables).