Description Usage Arguments Value
Runs a desired function on an array of columns of a data frame with similar column names (ex. Q_1_1, Q_1_2, ..., Q_2_1, Q_2_2, ...). Defaults are useful for Qualtrics data structures.
1 2 3 |
df |
main data frame |
q |
string representing question name (ex. "Q") |
id1 |
vector specifying the row numbers (1,2,3...) |
id2 |
vector specifying the column numbers (1,2,3...) |
dfQuestions |
data frame with same columns as df - contains question strings |
func |
function to run on cleaned data. An example could be fixing text (removing a ":") or converting to a different class. Default is no function. |
remove |
vector of strings/objects to remove from each column (ex. NA, NaN) |
questionChar |
character to help specify data in the question. Default is "-", which Qualtrics uses to show the question options. |
charInQ |
number of times that questionChar shows up in the unused part of the question. |
charInCol |
number of times that questionChar shows up in the column names part of the question (the last part). |
a data frame containing one row for each response that was not removed. The data frame can be quickly summarized or tabled, or graphed using EMI functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.