percent_change returns the element-wise percent change between two numeric vectors.

percent_change(baseline, followup)

Arguments

baseline, followup

A numeric vector with data to compute the percent change.

Value

A vector of class lvmisc_percent.

See also

Examples

baseline <- sample(20:40, 10) followup <- baseline * runif(10, min = 0.5, max = 1.5) percent_change(baseline, followup)
#> <lvmisc_percent[10]> #> [1] -36.4789523882791% 11.6904383990914% -36.4234364591539% 40.8929002005607% #> [5] 38.7914896942675% 18.5511471936479% 12.9631103947759% 25.0825171126053% #> [9] 41.7777327587828% -13.9929717872292%