- Posts: 30
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Read Data from LS in R Studio with limer
- evaluation2023
- Topic Author
- Offline
- Junior Member
Less
More
1 month 1 week ago #258767
by evaluation2023
PHP Version 8.0.28
Version 5.6.4+230206
Read Data from LS in R Studio with limer was created by evaluation2023
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.4.1
Own server or LimeSurvey hosting: own
Survey theme/template:
==================
Hi,
when using limer package by andrewheiss in R Studio I can download survey data with
get_responses(iSurveyID = 945155, sLanguageCode= '', sResponseType='short', sCompletionStatus = "complete")
That works fine. Unfortunately I need the participants data "firstname", "lastname" and "e-mail" downloaded, too in that data.frame.
Is there a way to get those data?
When downloading the results in LS I can select the participants data needed.
Your LimeSurvey version: 6.4.1
Own server or LimeSurvey hosting: own
Survey theme/template:
==================
Hi,
when using limer package by andrewheiss in R Studio I can download survey data with
get_responses(iSurveyID = 945155, sLanguageCode= '', sResponseType='short', sCompletionStatus = "complete")
That works fine. Unfortunately I need the participants data "firstname", "lastname" and "e-mail" downloaded, too in that data.frame.
Is there a way to get those data?
When downloading the results in LS I can select the participants data needed.
PHP Version 8.0.28
Version 5.6.4+230206
Please Log in to join the conversation.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
1 month 1 week ago #258768
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Read Data from LS in R Studio with limer
Hi,
Here is an example.
[url] forums.limesurvey.org/forum/development/...with-vba-json#232797 [/url]
I admit, it is a php example.
To receive these data you have to define ALL variables you want to export.
I do not know if it also works in the limer library.
But you may give it a try.
Joffm
Here is an example.
[url] forums.limesurvey.org/forum/development/...with-vba-json#232797 [/url]
I admit, it is a php example.
To receive these data you have to define ALL variables you want to export.
I do not know if it also works in the limer library.
But you may give it a try.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: evaluation2023
Please Log in to join the conversation.
- evaluation2023
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 0
1 week 4 days ago #260317
by evaluation2023
PHP Version 8.0.28
Version 5.6.4+230206
Replied by evaluation2023 on topic Read Data from LS in R Studio with limer
I got it to work with download the responses and the tokens and merge it at the end, works fine:
data<- get_responses(iSurveyID = 123456, sLanguageCode= '', sResponseType='short', sCompletionStatus = "complete")
tokens<-get_participants(123456, iStart=1, iLimit=999999, bUnused=FALSE, aAttributes=FALSE)
tokens<-cbind(tokens$participant_info, tokens[-c(3)])
tokens<-tokens[,c(1,5)]
data<-merge(data, tokens, by="token", all = T)
data<- get_responses(iSurveyID = 123456, sLanguageCode= '', sResponseType='short', sCompletionStatus = "complete")
tokens<-get_participants(123456, iStart=1, iLimit=999999, bUnused=FALSE, aAttributes=FALSE)
tokens<-cbind(tokens$participant_info, tokens[-c(3)])
tokens<-tokens[,c(1,5)]
data<-merge(data, tokens, by="token", all = T)
PHP Version 8.0.28
Version 5.6.4+230206
Please Log in to join the conversation.