Skip to contents

Calculates the proportional difference for a vector of two non-negative numbers.

Usage

proportional_difference2(x)

Arguments

x

A numeric vector of length 2.

Value

A number.

See also

Other proportional fun2: proportional_change2()

Examples

proportional_difference2(c(1, 2))
#> [1] 0.6666667
proportional_difference2(c(2, 1))
#> [1] -0.6666667