Using RemoteControl in R and reading data from limesurvey into R

More
2 years 3 months ago #137530 by jelo
jelo replied the topic: Using RemoteControl in R and reading data from limesurvey into R
The manual states > print(survey_matrix[1:2,])
> print(survey_matrix[1:2,])
Error in survey_matrix[1:2, ] : subscript out of bounds

When using print(survey_matrix[1:2]) without the comma the result looks correct?
Not sure if that should be changed in the manual.
R 3.3 was used. Still a greenhorn in R.

Access via https is possible. Seems to be an issue with mod security. Or it is a temporary issue.
Still wonder why a user was able to access via C# when the issue seems to be server-side.
Will have to ask for the C# code to see if that is possible.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #137543 by fransmarcelissen
fransmarcelissen replied the topic: Using RemoteControl in R and reading data from limesurvey into R
Sorry: it should be as follows:
survey_matrix<-call_limer(method='list_surveys')
print(survey_matrix[1:2,])

the object that call_limer generates should of course have the same name as the object that is printed.
But above is confusing: the object is a dataframe, not a matrix. So better is:

survey_dataframe<-call_limer(method='list_surveys')
print(survey_dataframe[1:2,])

[1:2,] means: the first two rows. If you want to print the whole list: leave this away.
I updated this in the manual.
Frans

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #143558 by kalimu
kalimu replied the topic: Using RemoteControl in R and reading data from limesurvey into R
At the European R User Meeting in Poland early version of the new R package was presented – LimeRick.
LimeRick is a bridge between R and LimeSurvey and it is under active development. You can access the code of the package on public repo:
github.com/kalimu/LimeRick
There are some experimental features so they can be changed in the future.

The presentation from the conference is here:
rpubs.com/kalimu/erum

Feel free to contact me (e.g. via the homepage contact form) if you have any suggestions, comments, feedback, etc.

Hopefully you will find the package useful.
Best,
Kamil Wais

Please Log in or Create an account to join the conversation.

More
1 year 5 months ago #152543 by jorgesinval
jorgesinval replied the topic: Using RemoteControl in R and reading data from limesurvey into R
Based on your experience, which is better? Use LimeSurvey to generate reports to each respondent, or import the data generate the reports with R, and use R to send the reports (e.g. mailR)?

Thanks.

Please Log in or Create an account to join the conversation.

More
7 months 5 days ago #163998 by first
first replied the topic: Using RemoteControl in R and reading data from limesurvey into R
@jelo : I am also facing same issue.

First it asked me to install package xml2 and then I am getting error: Error: Argument 'txt' must be a JSON string, URL or file



Were you able to sort it out?

Note :
1) I am also using LS206lts over HTTPS
2) I am having no problem working with same interface via nodejs.

Survey Designer and Programmer
Attachments:

Please Log in or Create an account to join the conversation.

More
7 months 5 days ago - 7 months 5 days ago #164008 by first
first replied the topic: Using RemoteControl in R and reading data from limesurvey into R
Also please note that I have one more installation of ls206 lts (without https) and limer is working fine with it.

Maybe a discussion here will help R experts to understand issue better.

groups.google.com/a/spaziodati.eu/forum/...andelion/j2TowLs_5gY

Survey Designer and Programmer
Last Edit: 7 months 5 days ago by first.

Please Log in or Create an account to join the conversation.

More
7 months 5 days ago #164018 by first
first replied the topic: Using RemoteControl in R and reading data from limesurvey into R
More findings: Status code returned is 406 instead of 200. Any ideas...

Survey Designer and Programmer

Please Log in or Create an account to join the conversation.

More
7 months 5 days ago #164033 by jelo
jelo replied the topic: Using RemoteControl in R and reading data from limesurvey into R

first wrote: I have one more installation of ls206 lts (without https) and limer is working fine with it.


You use the same R script (only destination server different) for both LS installations?
The connection on the working LS installation is established via http and NOT via https.
The connection on the NON-working LS installation is established via https only?
Are both installations on the same server? If no, what differences are between these?
What R / OS environment is used on the client side?

The source of this issue can be a mod security rule issue. That could be triggered by many things.

I would check without https first. Change credentials afterwards. If http is working, you have an issue with the TLS encryption. Which can be a server or client side issue.
If http is not working, it might be a Modsecurity rule, which is preventing the Remotecontrol-API traffic.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

More
7 months 4 days ago #164042 by first
first replied the topic: Using RemoteControl in R and reading data from limesurvey into R
jelo: You use the same R script ...
Triven: Yes, you are right.

jelo: The connection on the working ...
Triven: LS 2.06 is installed on two servers - server1 and server2
server1 : HTTPS | able to connect from google cloud via remote API | not able to connected from R installalled on local computer (response code 406)
server2 : HTTP | able to connect from google cloud | able to connected from R

Survey Designer and Programmer

Please Log in or Create an account to join the conversation.

More
7 months 4 days ago #164055 by jelo
jelo replied the topic: Using RemoteControl in R and reading data from limesurvey into R
What R / OS environment is used on the client side?
I would try to connect from local computer to server1 with http first. Change credentials afterwards. If http is working, you have an issue with the TLS encryption. Which can be a server or client side issue.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

More
7 months 4 days ago #164056 by first
first replied the topic: Using RemoteControl in R and reading data from limesurvey into R
Disabling modsecurity at domain level worked well but white listing IP didnt . Do you suggest disabling modsecurity? Any other thoughts?

Survey Designer and Programmer

Please Log in or Create an account to join the conversation.

More
7 months 4 days ago #164078 by jelo
jelo replied the topic: Using RemoteControl in R and reading data from limesurvey into R
So, you already narrowed the issue down to mod-security? If that is the case, you should consult your administrator/hoster etc. If a mod-security rule is the issue, you can disable that rule per domain, per URL etc. You don't need to disable ModSecurity completely. But server administration is not part of this forum.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!