Survey.RdR6 Class representing a LimeSurvey survey
R6 Class representing a LimeSurvey survey
Create and work with a Survey to programmatically (or interactively) create a survey, export it to a tab separated values file, and import it to LimeSurvey.
titlesThe title of the survey in the primary language and any additional languages
descriptionsThe descriptions of the survey in the primary language and any additional languages
welcomeTextsThe welcome texts of the survey in the primary language and any additional languages
endTextsThe end texts of the survey in the primary language and any additional languages
endURLsThe end URLs of the survey in the primary language and any additional languages
endURLdescriptionsThe end URL descriptions of the survey in the primary language and any additional languages
dateformatsThe date format to use in the primary language and any additional languages; the index of the option from the dropdown in LimeSurvey (6 is the ISO standard, "YYYY-MM-DD").
numberformatsThe number format to use in
the primary language and any additional languages (for periods as
decimal marks, 0; for commas as decimal marks, 1).
sidThe unique survey identifier; if this is free when importing the survey, this will be used.
gsidThe Survey Group identifier.
adminThe name of the survey administrator
adminemailThe email address of the survey administrator
anonymizedWhether the survey uses anonymized
responses (Y or N).
faxtoThe contents of the "Fax to" field
formatHow to present the survey (Q for question by
question; G for group by group; and A for all in one).
savetimingsWhether to save timings of responses (Y or N).
templateThe name of the LimeSurvey theme to use.
languageThe primary language of the survey.
additional_languagesAny additional languages the survey uses.
datestampWhether to datestamp responses (Y or N).
usecookieWhether to use cookies to enable answer persistence.
allowregisterWhether to allow public registration (Y or N).
allowsaveWhether to allow users to save their responses and
returning later (Y or N).
autonumber_startWhere to start autonumbering
autoredirectWhether to automatically redirect users to a
URL (Y or N).
allowprevWhether to allow users to return to previous
pages (Y or N).
printanswersWhether to allow printing of answer (Y or N).
ipaddrWhether to store IP addresses (Y or N).
refurlWhether to store the referring URL (Y or N).
showsurveypolicynoticeWhether to show the data policy
notice (Y or N).
publicstatisticsWhether to have public statistics (Y or N).
publicgraphsWhether to show graphs in public
statistics (Y or N).
listpublicWhether to list the survey publicly (Y or N).
htmlemailWhether to use HTML format for token
emails (Y or N).
sendconfirmationWhether to send confirmation
emails (Y or N).
tokenanswerspersistenceWhether to use token-based
response persistence (Y or N).
assessmentsWhether to use assessments (Y or N).
usecaptchaWhether to use CAPTCHA's (Y or N).
usetokensWhether to use tokens (Y or N).
bounce_emailWhere bouncing emails should be sent.
emailresponsetoWhere detailed admin notifications emails should be sent.
emailnotificationtoWhere a notification should be sent for new responses.
tokenlengthThe token length.
showxquestionsWhether to show "There are X questions in this
survey" (Y or N).
showgroupinfoWhether to show group name and info (B for both,
?, or X to show nothing).
shownoanswerWhether to show the "No answer" option (Y or N).
showqnumcodeWhether to show answer codes or numbers (Y, N,
or X to show nothing).
bounceprocessingWhether to process bouncing emails? (Y or N).
showwelcomeWhether to show the welcome page (Y or N).
showprogressWhether to show the progress bar (Y or N).
questionindexWhether to show the question index (0 to
disable; can also be set to incremental or full (1 and 2?)).
navigationdelayThe navigation delay in seconds
nokeyboardWhether to show the on-screen keyboard (Y or N).
alloweditaftercompletionWhether to allow multiple
reponses (N) or to allow updating responses with one token (Y)?
googleanalyticsstyleThe google analytics settings; 0 for None,
other values for other settings.
googleanalyticsapikeyThe google analytics API key.
groupsThe groups in the survey.
tsvDataUsed to store the dataframe saved to a file as tab separated values.
get_group_idsA list of all group ids.
get_group_titlesA list of all group ids.
new()Create a new survey object.
Survey$new(
titles,
descriptions = "",
welcomeTexts = "",
endTexts = "",
endURLs = "",
endURLdescriptions = "",
dateformats = 6,
numberformats = 0,
sid = 1,
gsid = 1,
admin = "Admin Name",
adminemail = "email@add.ress",
anonymized = "Y",
faxto = "",
format = "G",
savetimings = "Y",
template = "vanilla",
language = "en",
additional_languages = "",
datestamp = "Y",
usecookie = "N",
allowregister = "N",
allowsave = "N",
autonumber_start = 0,
autoredirect = "Y",
allowprev = "N",
printanswers = "N",
ipaddr = "N",
refurl = "N",
showsurveypolicynotice = "0",
publicstatistics = "N",
publicgraphs = "N",
listpublic = "N",
htmlemail = "Y",
sendconfirmation = "N",
tokenanswerspersistence = "N",
assessments = "N",
usecaptcha = "N",
usetokens = "N",
bounce_email = "",
emailresponseto = "",
emailnotificationto = "",
tokenlength = 15,
showxquestions = "N",
showgroupinfo = "X",
shownoanswer = "N",
showqnumcode = "X",
bounceprocessing = "N",
showwelcome = "N",
showprogress = "N",
questionindex = "0",
navigationdelay = "0",
nokeyboard = "N",
alloweditaftercompletion = "N",
googleanalyticsstyle = 0,
googleanalyticsapikey = "",
new_id_fun = NULL
)titlesThe titles of the survey in the primary language and optionally any addiitonal languages.
descriptionsThe descriptions of the survey in the primary language and any additional languages
welcomeTextsThe welcome texts of the survey in the primary language and any additional languages
endTextsThe end texts of the survey in the primary language and any additional languages
endURLsThe end URLs of the survey in the primary language and any additional languages
endURLdescriptionsThe end URL descriptions of the survey in the primary language and any additional languages
dateformatsThe date formats to use in the primary language and any additional languages; the index of the option from the dropdown in LimeSurvey (6 is the ISO standard, "YYYY-MM-DD").
numberformatsThe number formats to use in
the primary language and any additional languages (for periods as
decimal marks, 0; for commas as decimal marks, 1).
sidThe unique survey identifier; if this is free when importing the survey, this will be used.
gsidThe Survey Group identifier.
adminThe name of the survey administrator
adminemailThe email address of the survey administrator
anonymizedWhether the survey uses anonymized
responses (Y or N).
faxtoThe contents of the "Fax to" field
formatHow to present the survey (Q for question by
question; G for group by group; and A for all in one).
savetimingsWhether to save timings of responses (Y or N).
templateThe name of the LimeSurvey theme to use.
languageThe primary language of the survey.
additional_languagesAny additional languages the survey uses.
datestampWhether to datestamp responses (Y or N).
usecookieWhether to use cookies to enable answer persistence.
allowregisterWhether to allow public registration (Y or N).
allowsaveWhether to allow users to save their responses and
returning later (Y or N).
autonumber_startWhere to start autonumbering
autoredirectWhether to automatically redirect users to a
URL (Y or N).
allowprevWhether to allow users to return to previous
pages (Y or N).
printanswersWhether to allow printing of answer (Y or N).
ipaddrWhether to store IP addresses (Y or N).
refurlWhether to store the referring URL (Y or N).
showsurveypolicynoticeWhether to show the data policy
notice (Y or N).
publicstatisticsWhether to have public statistics (Y or N).
publicgraphsWhether to show graphs in public
statistics (Y or N).
listpublicWhether to list the survey publicly (Y or N).
htmlemailWhether to use HTML format for token
emails (Y or N).
sendconfirmationWhether to send confirmation
emails (Y or N).
tokenanswerspersistenceWhether to use token-based
response persistence (Y or N).
assessmentsWhether to use assessments (Y or N).
usecaptchaWhether to use CAPTCHA's (Y or N).
usetokensWhether to use tokens (Y or N).
bounce_emailWhere bouncing emails should be sent.
emailresponsetoWhere detailed admin notifications emails should be sent.
emailnotificationtoWhere a notification should be sent for new responses.
tokenlengthThe token length.
showxquestionsWhether to show "There are X questions in this
survey" (Y or N).
showgroupinfoWhether to show group name and info (Y, N,
or X to show nothing).
shownoanswerWhether to show the "No answer" option (Y or N).
showqnumcodeWhether to show answer codes or numbers (Y, N,
or X to show nothing).
bounceprocessingWhether to process bouncing emails? (Y or N).
showwelcomeWhether to show the welcome page (Y or N).
showprogressWhether to show the progress bar (Y or N).
questionindexWhether to show the question index (0 to
disable; can also be set to incremental or full (1 and 2?)).
navigationdelayThe navigation delay in seconds
nokeyboardWhether to show the on-screen keyboard (Y or N).
alloweditaftercompletionWhether to allow multiple
reponses (N) or to allow updating responses with one token (Y)?
googleanalyticsstyleThe google analytics settings; 0 for None,
other values for other settings.
googleanalyticsapikeyThe google analytics API key.
new_id_funA function to set identifiers (for XML exports, which mirrors MySQL tables and so needs identifiers). By default, new question objects receive this function from the group containing them; and groups receive it from the survey containing them. This ensures that identifiers are always unique in a survey (despite question objects not being able to 'see' anything in the group containing them, and group objects not being able to 'see' anything in the survey containing them; because they 'received' this function from the parent object, and it 'bubbles down' through groups to the questions, those functions still get and set a private identifier property in the 'top-most' object).
add_group()Add a group to a survey object.
titlesThe group's title, either as a named character vector where each element is the group title in a different language, and every element's name is the language code; or as a single character value, in which case the survey's primary language is used.
descriptionsThe group description, either as a named character vector where each element is the group description in a different language, and every element's name is the language code; or as a single character value, in which case the survey's primary language is used.
relevanceThe group's relevance equation.
random_groupThe group's randomization group.
add_question()Add a question to a survey object.
export_to_tsv()Export the survey as a tab separated values file (see https://manual.limesurvey.org/Tab_Separated_Value_survey_structure).
fileThe filename to which to save the file.
preventOverwritingWhether to prevent overwriting.
parallelWhether to work serially or in parallel.
encodingThe encoding to use
silentWhether to be silent or chatty.
backupLanguageThe language to get content from if not from the primary langage.