Description Usage Functions Examples
View source: R/formatting_funs.R
Format a number as a percentage
1 2 3 | as.percentage(num, digits = 1)
as.perc(num, digits = 1)
|
as.perc
: Shorthand
1 2 3 4 5 6 | tmp <- runif(5)
as.percentage(tmp)
mtcars %>%
count(gear) %>%
mutate(prop=as.percentage(n/sum(n)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.