View source: R/getGrowthRate.R
getGrowthRate | R Documentation |
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
getGrowthRate(data, start_year, end_year)
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 |
Returns numerical value for annual growth rate. Prints growth rate as a percentage.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.