getGrowthRate: Calculate annual growth rate

View source: R/getGrowthRate.R

getGrowthRateR Documentation

Calculate annual growth rate

Description

Calculates annual growth rate based on the equation: N = N0 * e ** rt

Where N is the end value, N0 is the starting value, r is the rate of growth and t is elapsed time. This equation is solved for 'r' such that: r = ln(N/N0) / t

Usage

getGrowthRate(data, start_year, end_year)

Arguments

data

A data frame with one column for a "time" and a column for the dependent variable

start_year

A numerical value corresponding to start year

end_year

A numerical value corresponding to end year

Value

Returns numerical value for annual growth rate. Prints growth rate as a percentage.


earlycapistran/consLettersUtils documentation built on Nov. 22, 2022, 1:22 a.m.