Skip to content

R and Limesurvey

3 messages · Fabrice DELENTE, Peter Dalgaard

#
Hello.

I used Limesurvey to get answers to a survey. Now I need to process the data
collected.

I exported the R syntax file describing the survey structure, the file is a 

http://fdelente.free.fr/Surveydata_syntax.R

It contains lines like

attributes(data)$variable.labels[which(names(data)=="V5")]="Quel ?ge avez-vous ?"

that are the clear text of my question.

I'd like to be able to reference these values to display them.

I tried print(attributes(data)$variable.labels["V5"] but it gives NA whereas
I'd like to get "Quel ?ge avez-vous ?".

How does this work?

Thanks for any hint!
#
Fabrice DELENTE wrote:
Hmm, does it help if you first  set

names(attributes(data)$variable.labels) <- names(data)
#
Yes, it does, many thanks!

I'll take some time later to work out what all these commands mean :^)