Problems with RPC: export_responses

More
7 months 1 week ago - 7 months 1 week ago #153879 by tammo
tammo created the topic: Problems with RPC: export_responses
From within R I am trying to get export_responses working on my RStudio on Windows10

There are some things that go wrong:
  1. One of my surveys is quite big: about 80.000 responses with 155 variables. I cannot read that, it resulted in an error message: Error: parse error: premature EOF. Another large survey (32000 repondents) I could read though.
  2. OK, I thought to be clever and restrict the output by ID using iFromResponseID = 0 and iToResponseID = 200, but this does not work, even when I try it on another survey, where I can read all responses. It results in no output at all. Quoting or unquoting the integers makes no difference.
  3. Then I thought I would restrict the output by fields, using aFields=list("id", "datestamp"), but this does nothing: when using it on another survey, I just get all fields

My questions are:
- Where lies the bottleneck in the number of responses that LimeSurvey can spit up? Is it in the server, LimeSurvey or in my computer?

- Do I do something wrong in using
<iFromResponseID = 0 and iToResponseID = 200>
or did I run into a bug?

- Is it possible to restrict the fields I want to retrieve and how. What is wrong in my code?

- when you retrieve by ID, will it use the ID as it is in the response table or another internal ID?

Used code:

results<-base64_to_df(call_limer(method="export_responses",
params = list (iSurveyID=284265,
sDocumentType="csv",
sLanguageCode="nl-informal",
iFromResponseID = "0",
iToResponseID = "116",
sCompletionStatus= "complete",
sHeadingType = "code",
sResponseType = "short",
aFields = list("id", "datestamp"))))


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template
Last Edit: 7 months 1 week ago by tammo.

Please Log in to join the conversation.

More
7 months 6 days ago #154430 by tammo
tammo replied the topic: Problems with RPC: export_responses
As it turns out, the RPC is sensitive to the order in which it gets feeded the parameters. You need to use exactly the right order as stated in the API documentation at:

api.limesurvey.org/classes/remotecontrol_handle.html

So the correct statement (which works) for the previous post is:

temp<-base64_to_df(call_limer(method="export_responses",
params = list (iSurveyID=SID,
sDocumentType="csv",
sLanguageCode="nl-informal",
sCompletionStatus= "complete",
sHeadingType = "code",
sResponseType = "short",
iFromResponseID = "0",
iToResponseID = "1160",
aFields = list("id", "datestamp")
)))


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
7 months 6 days ago #154431 by tammo
tammo replied the topic: Problems with RPC: export_responses
So, part of my problem is solved now. Still hope to hear more about the limits of responses you can get out of LS in one run.

Tammo


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!