zero_one | R Documentation |
Scale a numeric vector to between 0 and 1. N.B. Kind of pointless given 'scales::rescale' exists.
zero_one(x)
x |
Vector to transform. |
Numeric values ranging between 0 and 1.
## Not run:
tibble::tibble(YEAR = c(2018:2020),
VALUE = c(1,2,3)) %>%
dplyr::mutate(YEAR_SCALED = zero_one(YEAR),
VALUE_SCALED = zero_one(VALUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.