- Posts: 5070
- Thank you received: 1263
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Using RemoteControl in R and reading data from limesurvey into R
- jelo
- Offline
- Platinum Member
Less
More
7 years 9 months ago #137530
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Using RemoteControl in R and reading data from limesurvey into R
The manual states > print(survey_matrix[1:2,])
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.
Code:
> 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.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- fransmarcelissen
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 118
- Thank you received: 49
7 years 9 months ago #137543
by fransmarcelissen
Replied by fransmarcelissen on 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
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
The topic has been locked.
- kalimu
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 1
7 years 5 months ago #143558
by kalimu
Replied by kalimu on 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
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
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- jorgesinval
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 2
6 years 11 months ago #152543
by jorgesinval
Sinval
Replied by jorgesinval on 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.
Thanks.
Sinval
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
6 years 1 month ago #163998
by first
Survey Designer and Programmer
Replied by first on 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.
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:
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
6 years 1 month ago - 6 years 1 month ago #164008
by first
Survey Designer and Programmer
Replied by first on 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
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: 6 years 1 month ago by first.
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
6 years 1 month ago #164018
by first
Survey Designer and Programmer
Replied by first on 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
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
6 years 1 month ago #164033
by jelo
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.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on 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.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
6 years 1 month ago #164042
by first
Survey Designer and Programmer
Replied by first on 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
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
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
6 years 1 month ago #164055
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on 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.
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.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 256
- Thank you received: 37
6 years 1 month ago #164056
by first
Survey Designer and Programmer
Replied by first on 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
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
6 years 1 month ago #164078
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on 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.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.