Learn R Programming

kutils (version 1.39)

importQualtrics: Import Qualtrics survey files, apply clean column names

Description

Defaults are based on most common format received from Qualtrics downloads to CSV or XLSX (MS Excel) formats. We assume that the file has the column names in row 1 and that 3 rows are skipped before the real data begins. If the parameter questrow is used, it designates a row that is interpreted as the survey questions themselves. Often, this is in row 2.

Usage

importQualtrics(file, namerow = 1, skip = 3, questrow = NULL,
  dropTEXT = TRUE, stringsAsFactors = FALSE)

Arguments

file

Character string with file name of a CSV or XLSX file from Qualtrics.

namerow

Default 1, the information to be used as column names (the HEADER information in R's read.table function)

skip

Number of rows to omit because they are not data

questrow

Row number to be treated as the questions in the survey. Usually 2. Default is NULL, meaning questions are not imported.

dropTEXT

Default TRUE, columns ending in "_TEXT" are omitted.

stringsAsFactors

Default FALSE, same meaning as R's read.csv. Does not affect importation of Excel files.

Value

Data frame that has attribute "questions" if questrow is specified.