View source: R/QualtricsPreprocess.R
This function processes a Qualtrics data file that has been read into R (assumes a legacy View Results format). The first 10 variables automatically added by Qualtrics are renamed with their labels, labels are removed from the dataset and used to create a variable label file, a time taken variable is calculated based on the start and end times, and any identifying or otherwise unwanted variables are removed (specific variable names can be specified in function; see below). It writes a comma-separated (.csv) file of the processed data and a tab-separated (.txt) data dictionary of the variable labels to the working directory.
1 2 | QualtricsPreprocess(x, remove.std.var = TRUE, remove.additional = "",
data.file = "ProcessedDataset.csv", label.file = "VariableLabels.txt")
|
x |
A dataframe. Assumes dataframe is a Qualtrics .csv file that has been read into R with read.csv. |
remove.std.var |
Logical. Whether the identifying variables added by Qualtrics (Name, EmailAddress, IPAddress, LocationLatitude, LocationLongitude, and LocationAccuracy) should be removed from the processed data. Defaults to TRUE. |
remove.additional |
A character or vector of characters containing the names of additional variables to remove from the processed file. This can include other direct identifiers recorded in the Qualtrics survey. |
data.file |
File name for the processed data file. String; should end in ".csv". Defaults to "ProcessedDataset.csv" in working directory. |
label.file |
File name for the label file. String; should end in ".txt". Defaults to "VariableLabels.txt" in working directory. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.