Calculate whether there has been either an increase, decrease or no change between two values

up_or_down(from, to)

Arguments

from

The stating value

to

The final value

Value

Text string, one of "decrease", "increase" or "no change"

Examples

up_or_down(100, 200)
#> [1] "increase"
up_or_down(200, 100)
#> [1] "decrease"
up_or_down(100, 100)
#> [1] "no change"