growth {businessPlanR} | R Documentation |
Calculates the differences between consecutive values in a numeric vector.
growth(x, round = c("round", "ceiling", "floor"), digits = 0, init = x[1])
x |
A numeric vector. |
round |
One of |
digits |
Integer, passed to |
init |
Numeric, the initial value to compare the first element of |
A numeric vector the same length as x
.
growth(c(1,10,12,15,122))