Last chance! 50% off unlimited learning
Sale ends in
createsurvey(template = NULL, survey = NULL, title, collector_name = NULL, type = 'email', recipients = NULL, email_replyto = NULL, email_subject = NULL, email_body = NULL, api_key = getOption('sm_api_key'), oauth_token = getOption('sm_oauth_token'), ...)
templates
. Must specify either template
xor survey
.surveylist
. Must specify either template
xor survey
.NULL
, the default “New Email Invitation” will be used.createcollector
.email
, first_name
, last_name
, and custom_id
.[SurveyLink]
as a placeholder for the survey link and [OptOutLink]
as a placeholder for the standard Survey Monkey opt-out. Unless you have a Gold or Platinum
account and have opted out of notification, you also need to include the footer link, [FooterLink]
.getOption('sm_api_key')
.smlogin
. By default, retrieved from getOption('sm_oauth_token')
.POST
.sm_collector
, an object of class sm_survey
, and additional details.## Not run:
# smlogin()
#
# # create survey by copying existing survey
# s <- surveylist()
# createsurvey(survey = s[[1]]$survey_id, title = 'Copied survey',
# collector_name='Emails',
# recipients = list(list('first@example.com'), list('second@example.com')),
# email_replyto='me@example.com', email_subject='Please complete a short survey!')
#
# # create survey from template
# tmps <- templates()
# createsurvey(template = tmps[[1]]$template_id, title = 'Copied survey',
# collector_name='Emails',
# recipients = list(list('first@example.com'), list('second@example.com')),
# email_replyto='me@example.com', email_subject='Please complete a short survey!')
# ## End(Not run)
Run the code above in your browser using DataLab