Clean a data set downloaded from Qualtrics
clean_data_from_qualtrics(
data = NULL,
remove_survey_preview_data = TRUE,
remove_test_response_data = TRUE,
default_cols_by_qualtrics = NULL,
default_cols_by_qualtrics_new = NULL,
warn_accuracy_loss = FALSE,
click_data_cols = "rm",
page_submit_cols = "move_to_right"
)
a data.table object
a data object (a data frame or a data.table)
logical. Whether to remove data from survey preview (default = TRUE)
logical. Whether to remove data from test response (default = TRUE)
names of columns that Qualtrics
includes in the data set by default (e.g., "StartDate", "Finished").
Accepting the default value default_cols_by_qualtrics = NULL
will set the names to be those that Qualtrics uses as of Dec 25, 2020.
new names for columns that
Qualtrics includes in the data set by default
(e.g., "StartDate", "Finished").
Accepting the default value default_cols_by_qualtrics_new = NULL
will set the names to be those that Qualtrics uses as of Dec 25, 2020
converted to snake_case (e.g., "start_date", "finished").
logical. whether to warn the user if converting character to numeric leads to loss of accuracy. (default = FALSE)
if click_data_cols = "rm"
,
columns containing click data (e.g., "_First Click") will be
removed. If click_data_cols = "move_to_right"
, the columns
will be moved to the right (end) of the data set.
if page_submit_cols = "rm"
,
columns containing page submit data (e.g., "_Page Submit";
"response time" data) will be removed.
If page_submit_cols = "move_to_right"
, the columns
will be moved to the right (end) of the data set.
clean_data_from_qualtrics(mtcars)
clean_data_from_qualtrics(mtcars, default_cols_by_qualtrics = "mpg",
default_cols_by_qualtrics_new = "mpg2")
Run the code above in your browser using DataLab