Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getResponses() for one question #56

Open
domelia opened this issue Oct 18, 2021 · 3 comments
Open

getResponses() for one question #56

domelia opened this issue Oct 18, 2021 · 3 comments

Comments

@domelia
Copy link

domelia commented Oct 18, 2021

Hello,
I've tested the limer package and found it very useful and promising, thak you very much for your work.
Is there possibility to export results only for one question? I'm working on a project to visualize stats for active surveys grouped by one variable. Exporting all results is too slow, taking into account that I need only one question to examine.

Best regards,
Daria Omelchenko

@forstem6
Copy link

forstem6 commented Jun 14, 2022

Hi,

I hope it is still relevant. You can export only parts with:
get_responses(<yourSurveyID>, iFromResponseID = <firstparticipant>, iToResponseID = <lastparticipant>, aFields = c("qcode_of_your_first_question_you_want_to_export", "qcode_of_your_second_question_you_want_to_export"))

Two notes:
You need to specify the range of participants you want to export, otherwise it does not work (that's what took me ages to find out).
In case you do not know. The questioncodes are in the format XX. So something like 896543X198X1234SQ001. I always look them up by inspecting the survey with a Page Inspector built into your browser.

@domelia
Copy link
Author

domelia commented Jun 25, 2022

Hi, forstem6
Thank you for your reply. As the main task for my shiny app to control for the number of completed responses, it is impossible to enter every time the number of participants. Or rather, it doesn't make sense to do it manually. But your formula is very useful, I'm sure I will use it in another situation. Thank you very much.

@Jan-E
Copy link
Contributor

Jan-E commented Jun 25, 2022

What happens if you enter a number for iToResponseID that is higher than it ever should become?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants