R/misc.R
relChange.Rd
This function calculates the relative change of a vector, taking the first value as a reference value.
relChange(v, fac = 100)
A numeric vector with length greater than 1.
numeric
A numeric constant multiplier on the resulting metric.
A numeric vector.
Martin Jung
# Example vector x <- c(20,6,2,1,15,25) relChange(x) #> [1] 0 -70 -90 -95 -25 25