pullsg_campaign: Download survey campaign data from Survey Gizmo, storing an R...

Description Usage Arguments

Description

This function downloads campaign data from Survey Gizmo (SG), saving the returned email/response data as an R data.frame. Because SG limits the size of JSON data pulls via the API (currently, the limit is 250), it calculates the number of pulls needed to download the entire response set and binds the returned frames. The "contactid" field joins email address and other campaign data with the survey response objects (see pullsg). Note that this function only downloads contact object data that is accessible through the API, specifically, contact objects associated with the subtype "email" where status is "Active."

Usage

1
2
pullsg_campaign(surveyid, api, reset_row_names = TRUE, customfields = TRUE,
  contactinfo = TRUE, small = FALSE, verbose = TRUE)

Arguments

surveyid

The survey's unique SG ID number (in V4 of the API, the portion of the surveyresponse call URL which follows "id/", e.g.: "...build/id/1234567"

api

The user's private API key for Survey Gizmo

reset_row_names

When true (the default), resets row names to 1, 2,..N in the returned dataframe

customfields

When true (the default), SG's "custom fields" associated with the contact are preserved in the returned data.

contactinfo

When true (the default), SG's phone and physical address fields associated with the contact are preserved in the returned data.

small

When true, the only fields returned are contactid and email address.

verbose

When true (the default), download progress is printed to standard output. NOTE: When set to false, pullsg will change the stub of SG system variables to sys_*


DerekYves/rsurveygizmo documentation built on May 6, 2019, 2:10 p.m.