michael-cw / surveysolutionsapi Goto Github PK
View Code? Open in Web Editor NEWA comprehensive set of R functions to access the Survey Solutions REST API (httr based version)
Home Page: https://michael-cw.github.io/SurveySolutionsAPI/
A comprehensive set of R functions to access the Survey Solutions REST API (httr based version)
Home Page: https://michael-cw.github.io/SurveySolutionsAPI/
The suso_export
function is broken as the new version of Survey Solution has shifted to V2 API and the code here still has V1.
Hi Michael,
Will we be getting an updated package? This one is excellent and all it needs is to incorporate Workspaces.
Kind regards.
The Interview ID that we get using suso_getAllInterviewQuestionnaire
command and suso_export
command are different.
suso_getAllInterviewQuestionnaire
- bb6c5d61-889c-4b9d-90f9-7f89f22deb45
suso_export
- bb6c5d61889c4b9d90f97f89f22deb45
suso_getAllInterviewQuestionnaire
has '-' while suso_export
doesn't.
On documentation is stated:
workStatus : define which statuses the file should inlude (i.e. ...), if NULL all is exported .
But the code inside the function does this:
workStatus<-match.arg(workStatus, margs)
Where margs
is :
["Restored","Created","SupervisorAssigned","InterviewerAssigned","RejectedBySupervisor","ReadyForInterview","SentToCapi","Restarted","Completed","ApprovedBySupervisor","RejectedByHeadquarters","ApprovedByHeadquarters","Deleted"]
The match.arg()
documentation says on Arguments section:
arg : a character vector (of length one unless several.ok is TRUE) or NULL.
And on Details section:
In the one-argument form match.arg(arg), the choices are obtained from a default setting for the formal argument arg of the function from which match.arg was called.
(Since default argument matching will set arg to choices, this is allowed as an exception to the ‘length one unless several.ok is TRUE’ rule, and returns the first element.)
The wording is not very clear, but means that if length of arg is not 1 (as it happens to be when arg is NULL). the first element of choice
is returned.
And the code of match.arg()
contains:
if (is.null(arg))
return(choices[1L])
So workStatus
ends up with the value "Restored", which is not the documented behaviour for suso_export()
.
Regards
Hi I'm getting the following error when using suso_get_stats function example on website:
statquest <- suso_get_stats(workspace = Workspace, questID = questlist[2, QuestionnaireId], version = questlist[2, Version], qQuest = questionnaire[13,
PublicKey])
and getting the following error:
[1] "https://slnet.solutions/vieuxfort/api/v1/statistics?query.questionnaireId=4c8404e9ca814f2cbafb4d8099196095&query.version=1&query.question=084aa69c-ec89-566b-f67a-b02622bd7ad5&query.exportType=Csv&query.pivot=false&query.expandTeams=true"
Error: Invalid request! Please check your input parameters.
Hi,
Can you please update as it is no longer relevant for newer versions of Survey Solutions. i.e workspaces. Thanks
CSO St.Lucia
suso_getSV currently stops with error, when the server has no supervisor loaded. add NULL return.
Hi Michael,
Thanks for publishing the new updates. Truly appreciated.
Kind regards.
return NULL when there are 0 assignments
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.