View source: R/percentage_change.R
percent_lost | R Documentation |
Function to calculate the percentage lost between two values.
percent_lost(value, value_two, as_decimal = FALSE)
value |
Numeric vector of values. |
value_two |
Numeric vector of values. |
as_decimal |
Should the percentage be represented in a 0 to 1 scale? |
Numeric vector with length of value
.
Stuart K. Grange
# Check the calculation, take 20 from 100
percent_lost(100, 80)
# Take 1693.2 from 33864
percent_lost(33864, 32170.8)
percent_lost(33864, 32170.8, as_decimal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.