Description Usage Arguments Details Value Examples
View source: R/jamie-internals.R
This function is used to recode items within a dataframe. (e.g., 1 = 4, 2 = 3, 3 = 2, 4 = 1).
1 | recode_items_in_df(items_df, original, recoded)
|
items_df |
A dataframe containing items to be recoded. |
original |
A vector containing the original coding of the variable (e.g., 1, 2, 3, 4). |
recoded |
A vector containing the recoding of the variable (e.g., 4, 3, 2, 1). "recoded" and "original" must be the same length. |
The input must be a dataframe or an error will result.
A dataframe of recoded data are returned (usually questionnaire items).
1 2 3 4 | ## Not run:
score_items_in_df(a_dataframe[some_items])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.