Description Usage Arguments Examples
This function allows for a set of variables to be rescaled from any original min and max to any target min and max.
1 | rescale_cols(data, variables, old.min, old.max, new.min, new.max)
|
data |
The input dataset |
variables |
A character vector of variables to be operated on |
old.min |
the minima of the current variables |
old.max |
the maxima of the current variables |
new.min |
the minima of the new variables |
new.max |
the maxima of the new variables |
1 2 | # rescale the carb column of mtcars from 1-8 to 1-100.
rescale_cols(mtcars, 'carb', old.min = 1, old.max = 8, new.min = 1, new.max = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.