qualtRics (version 0.1)

getSurvey: Export a survey and download into R

Description

Export a qualtrics survey you own and import the survey directly into R. NOTE: If you keep getting errors try to use your institution's base URL. See https://api.qualtrics.com/docs/root-url.

Usage

getSurvey(surveyID, headers,
  base_url = "https://yourdatacenterid.qualtrics.com/API/v3/responseexports/",
  verbose = FALSE)

Arguments

surveyID

Unique ID for the survey you want to download. Returned as 'id' by the getSurveyIDs function.

headers

'headers' object - returned by the 'constructHeader' function. See constructHeader.

base_url

Base url for your institution (see https://api.qualtrics.com/docs/csv. If you do not fill in anything, the function will use the default url. Using your institution-specific url can significantly speed up queries.)

verbose

Print verbose messages to the R console? Defaults to FALSE

See Also

See https://api.qualtrics.com/docs/csv for documentation on the Qualtrics API.

Examples

Run this code
## Not run: 
# head <- constructHeader("<YOUR-API-KEY-HERE>")
# surveys <- getSurveys(head,
#                       "https://leidenuniv.eu.qualtrics.com/API/v3/responseexports/")
#                       # URL is for my own institution.
#                       # Substitute with your own institution's url
# mysurvey <- getSurvey(surveys$id[6],
#                       head,
#                       "https://leidenuniv.eu.qualtrics.com/API/v3/responseexports/",
#                       verbose=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab