Description Usage Arguments Examples
Given a dataframe, a list of variables, and the min and max of those variables (which must be the same) reverses all variables. Returns a dataframe containing the result.
1 | reverse_cols(data, variables, min, max)
|
data |
The input dataset |
variables |
A character vector of variables that require reversing |
min |
The minimum of all the variables to be reversed (for variables that have different mins, use separate function calls) |
max |
The maximum of all the variables to be reversed |
1 2 | # Reverses the carb column in mtcars
reverse_cols(mtcars, 'carb', min = 1, max = 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.