View source: R/percentage_change.R
percentage_difference | R Documentation |
Function to calculate the percentage difference between two values.
percentage_difference(value, value_two)
value |
Numeric vector of values. |
value_two |
Numeric vector of values. |
Numeric vector with length of value
.
Stuart K. Grange
percentage_change
# Calculate some differences
percentage_difference(100, 80)
percentage_difference(104, 130)
# A percentage difference's sign changes when the order of the inputs change,
# but not the value
percentage_difference(104, 130)
percentage_difference(130, 104)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.