growth_rate | R Documentation |
Compute the growth rates for a vector or each column of a matrix.
growth_rate(x, log = FALSE, first.na = TRUE)
x |
a vector or a matrix. |
log |
If log==TRUE, the logarithmic growth rate will be computed. |
first.na |
If first.na==FALSE, the result doesn't contain the first NA. |
a vector or a matrix consisting of growth rates.
x <- matrix(1:8, 4, 2)
growth_rate(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.