View source: R/likert_switch.R
likert_switch | R Documentation |
As some items in Likert scale questionnaires are inversted, it is necessary to invert them to combine the results from a particular item with the others. This function does exactly that.
likert_switch(
data,
name,
chr = FALSE,
n,
qoi,
export = TRUE)
data |
a data frame with individual participants in rows and different measures in columns. |
name |
name of the analysis to specify the output file. |
chr |
if the items in the data frame are characters instead of numerical entries, set chr to TRUE |
n |
number of sclae items. Default = 5. |
qoi |
Question or item of interest in a dataset with many different rows. Default = 1. |
export |
TRUE if a CSV file with the modified data should be exported, FALSE if not. |
# If you want to invert the third column that is on a 5-point Likert scale
likert_switch(data, name = "Item3_REV", n = 5, qoi = c(3), export = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.