Calculate the percent change.

pchange(start, end, ending = "", percent_first = TRUE, value_only = FALSE)

Arguments

start

The value it started with.

end

The value it ended with.

ending

A text string. Default "".

percent_first

Options: T/F. Puts the percent first in the sentance.

value_only

Options: T/F. Will only provide the value, and no text. percent_first is over-ridden.

Examples

pchange(start = 8, end = 1)
#> [1] "an 88% decrease"
pchange(start = 3, end = 6, ending = " in fish landings", percent_first = TRUE)
#> [1] "a 100% increase in fish landings"
pchange(start = 3, end = 4, ending = " in fish landings", percent_first = FALSE)
#> [1] " increase in fish landings of a 33%"
pchange(start = 3, end = 4, ending = " in fish landings", value_only = TRUE)
#> [1] 33.33333