qualtricsSurveyWriter: Creates an Advanced Format text file from csv.

Description Usage Arguments Details Value Author(s) Examples

View source: R/qualtricsSurveyWriter.R

Description

This function creates an Advanced Format text file for import into Qualtrics.

Usage

1
2
qualtricsSurveyWriter(completeSurveyDataFrame, roSeparator, pageBreakEvery,
                          outputFileName)

Arguments

completeSurveyDataFrame

The complete data frame containing the survey. Can be created as a data frame or read in from a file. Should contain variables called "question" (contains the question text), "responseOptions" ( contains the response option for each question, separated by some delimiter), and optionally "id" (the ID used in Qualtrics).

roSeparator

Character (default: ";") The character used for separating the response options.

pageBreakEvery

(default: 0) How many questions on a page before inserting a page break.

outputFileName

(default: "surveyOut.txt") the name and location for the outputted text file.

Details

You can create the data frame or read in the survey from csv/xlsx.

Value

This function returns a text file formatted for Qualtrics.

Author(s)

Seth Berry

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
questions = data.frame(question = c("I enjoy coding.",
                                    "To what extent do you hate or love R?", "Done?"),
                       responseOptions = c("No;Yes", 
                                           "Strongly hate;Hate;Neither;Love;Strongly love", 
                                           "No;Maybe;Yes"),
                       id = c("enjoyCode", "hateLoveR", "done"), 
                       stringsAsFactors = FALSE)


qualtricsSurveyWriter(completeSurveyDataFrame = questions, roSeparator = ";", 
             pageBreakEvery = 2)

## End(Not run)

saberry/qualtricsR documentation built on Aug. 21, 2020, 5:55 p.m.