clean_data_from_qualtrics: Clean data from Qualtrics

View source: R/clean_data_from_qualtrics.R

clean_data_from_qualtricsR Documentation

Clean data from Qualtrics

Description

Clean a data set downloaded from Qualtrics

Usage

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"
)

Arguments

data

a data object (a data frame or a data.table)

remove_survey_preview_data

logical. Whether to remove data from survey preview (default = TRUE)

remove_test_response_data

logical. Whether to remove data from test response (default = TRUE)

default_cols_by_qualtrics

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.

default_cols_by_qualtrics_new

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").

warn_accuracy_loss

logical. whether to warn the user if converting character to numeric leads to loss of accuracy. (default = FALSE)

click_data_cols

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.

page_submit_cols

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.

Value

a data.table object

Examples

clean_data_from_qualtrics(mtcars)
clean_data_from_qualtrics(mtcars, default_cols_by_qualtrics = "mpg",
default_cols_by_qualtrics_new = "mpg2")

kim documentation built on Oct. 9, 2023, 5:08 p.m.