Description Usage Arguments Examples
Calculates the percent change of two numbers or vectors, if prior = 0 then percent change is 100
1 | pct_change(prior, current, format = T, ...)
|
prior |
A numeric object |
current |
A numeric object |
format |
If TRUE (default) then output is converted to a percentage with formattable, otherwise proportion |
... |
Any arguments passed to formattable::percent, most likely digits |
1 2 | pct_change(0, 1) returns 100.00%
pct_change(2, 3, format = F) returns 0.5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.