pct_to_str | R Documentation |
This function takes a vector of numerical values you want to convert into a percentage and creates a character vector with the '
pct_to_str(x, digits = 1, check_bounds = TRUE)
x |
a numerical vector to convert |
digits |
the number of digits to include in the converted percentage |
check_bounds |
logical. If true, will require that 0 <= x <= 1. This is to protect against accidental conversions. |
## Not run: x <- seq(0, 1, .1) y <- pct_to_str(x, 1) #set check_bounds = FALSE to convert values outside of 0 <= x <= 1 x <- c(1.0, 1.1) y <- pct_to_str(x, 1, check_bounds = FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.