Learn R Programming

Rmonkey (version 0.2)

responsecounts: Get response counts

Description

Get response counts for a survey collector

Usage

responsecounts(collector, api_key = getOption('sm_api_key'),
           oauth_token = getOption('sm_oauth_token'))

Arguments

collector

A collector ID number (or an object of class “sm_collector” from which it can be extracted), possibly returned by collectors.

api_key

Your API key. By default, retrieved from getOption('sm_api_key').

oauth_token

Your OAuth 2.0 token, as generated by smlogin. By default, retrieved from getOption('sm_oauth_token').

Value

A list containing response counts.

Details

Retrieves number of (started and completed) responses for a specified survey collector.

References

https://developer.surveymonkey.com/mashery/get_response_counts

Examples

Run this code
# NOT RUN {
smlogin()
s <- surveylist()
lapply(collectors(s[[1]]$survey_id), function(x) responsecounts(x$collector_id))
# }

Run the code above in your browser using DataLab