growth_rate: Compute the Growth Rate

View source: R/growth_rate.R

growth_rateR Documentation

Compute the Growth Rate

Description

Compute the growth rates for a vector or each column of a matrix.

Usage

growth_rate(x, log = FALSE, first.na = TRUE)

Arguments

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.

Value

a vector or a matrix consisting of growth rates.

Examples


x <- matrix(1:8, 4, 2)
growth_rate(x)



GE documentation built on Nov. 8, 2023, 9:07 a.m.

Related to growth_rate in GE...