Description Usage Arguments Value Functions Examples
The percentage is stored as a formatted string with the original value as an attribute. The formatted value is what will most often be needed but but allows for the original value to be recovered when the attribute is not stripped off.
1 2 3 4 5 |
x |
a numeric object indicating a percentage. |
... |
additional formatting arguments. |
places |
Places to show after the decimal point. |
threshold |
The minimum absolute percentage to show. |
For pct()
a string formatted for a percent.
For percent()
the same as pct but is classed as a 'percent'
and includes attributes for the raw value.
pct
: Format a number as a percent.
1 2 3 | pct(2/3) #<-- no class
(x<- percent(2/3)) #<-- has class
as.numeric(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.