powered by
Compute the growth rates for a vector or each column of a matrix.
growth_rate(x, log = FALSE, first.na = TRUE)
a vector or a matrix consisting of growth rates.
a vector or a matrix.
If log==TRUE, the logarithmic growth rate will be computed.
If first.na==FALSE, the result doesn't contain the first NA.
# \donttest{ x <- matrix(1:8, 4, 2) growth_rate(x) # }
Run the code above in your browser using DataLab