Get list of respondents for a survey
respondentlist(survey, collector = NULL, page = NULL, page_size = NULL,
start_date = NULL, end_date = NULL,
start_modified_date = NULL,
end_modified_date = NULL,
name = NULL, order_asc = NULL, order_by = NULL,
fields = NULL,
api_key = getOption('sm_api_key'),
oauth_token = getOption('sm_oauth_token'))
A Survey Monkey survey ID number (or an object of class “sm_survey” from which it can be extracted), possibly returned by surveylist
.
A collector ID number, possibly returned by collectors
.
A number indicating which page of results to return.
The number of results to return per API call. Default is 1000.
A start datetime to restrict result to. Any returned respondents must have been created on or after this datetime. Required format is YYYY-MM-DD HH:MM:SS
, implicitly in UTC; if argument is of class POSIXct
, formatting is handled automatically.
An end datetime to restrict result to. Any returned respondents must have been created strictly before this datetime. Required format is YYYY-MM-DD HH:MM:SS
, implicitly in UTC; if argument is of class POSIXct
, formatting is handled automatically.
A start datetime to restrict result to. Any returned respondents must have been modified on or after this datetime. Required format is YYYY-MM-DD HH:MM:SS
, implicitly in UTC; if argument is of class POSIXct
, formatting is handled automatically.
An end datetime to restrict result to. Any returned respondents must have been modified strictly before this datetime. Required format is YYYY-MM-DD HH:MM:SS
, implicitly in UTC; if argument is of class POSIXct
, formatting is handled automatically.
A character string containing a name of a survey collector to search for.
A boolean indicating whether results should be sorted in ascending or descending (the default) order.
A boolean indicating whether results should be sorted in ascending or descending (the default) order.
A character vector containing the names of fields to return in each sm_collector
class object. See Details.
Your API key. By default, retrieved from getOption('sm_api_key')
.
Your OAuth 2.0 token, as generated by smlogin
. By default, retrieved from getOption('sm_oauth_token')
.
A list containing one or more objects of class sm_respondent
.
Retrieves list of respondents to a specified survey or, more specifically, a survey collector. BASIC users can only retrieve the first 100 respondents. Surveys with over 500,000 respondents will not be returned.
The fields
argument accepts one or more of the following values: date_start
, date_modified
, collector_id
, collection_mode
, custom_id
, email
, first_name
, last_name
, ip_address
, status
, analysis_url
.
https://developer.surveymonkey.com/mashery/get_respondent_list
# NOT RUN {
smlogin()
s <- surveylist()
respondentlist(s[[1]]$survey_id)
# }
Run the code above in your browser using DataLab