make_perclab() takes a proportion, multiplies it by 100, optionally rounds it, and pastes a percentage sign next to it.
make_perclab(x, d = 2)
a numeric vector
digits to round. Defaults to 2.
This function is useful if you're modeling proportions in something like a bar chart (for which proportions are more flexible) but want to label each bar as a percentage. The function here is mostly cosmetic.
The function takes a proportion, multiplies it by 100, (optionally) rounds it to a set decimal point, and pastes a percentage sign next to it.
x <- runif(100) make_perclab(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.