qualtRics (version 2.2)

readSurvey: Read comma separated csv file from Qualtrics.

Description

readSurvey Reads comma separated csvdata files generated by Qualtrics software. The second line containing the variable labels is imported. Repetitive introductions to matrix questions are automatically removed. Variable labels are stored as attributes.

Usage

readSurvey(file_name, convertStandardColumns = TRUE, stripHTML = TRUE,
  fileEncoding = "", legacyFormat = FALSE)

Arguments

file_name

String. A csv data file.

convertStandardColumns

Logical. If TRUE, then the function will convert general data columns (first name, last name, lat, lon, ip address, startdate, enddate etc.) to their proper format. defaults to TRUE.

stripHTML

Logical. If TRUE, then remove html tags. Defaults to TRUE

fileEncoding

Set this argument to import your survey using a specific encoding. (see utils{read.csv} and the 'Encoding' section in base{file})

legacyFormat

Logical. If TRUE, then import "legacy" format csv files (as of 2017). This option also sets fileEncoding to UTF-8-BOM if not specified otherwise. Defaults to FALSE

Value

A data frame. Variable labels are stored as attributes. They are not printed on the console but are visibile in the RStudio viewer.

Examples

Run this code
# NOT RUN {
my_data_frame <- readSurvey("<YOUR-PATH-TO-CSV-FILE>")
# }

Run the code above in your browser using DataLab