Compound Annual Growth Rate Function in R Statistics
Instead of depending on a library, you can create your own vectorized function:

Code:

library(tibble); library(dplyr)


example_data &lt;- tribble(
  ~Values_2009, ~Values_2014,
  10000, 19500,
  10500, 15000,
  25000, 35500
)


CAGR_formula &lt;- function(FV, PV, yrs = 4) {
values &lt;- ((FV/PV)^(1/yrs)-1)
return(values)
}

formula is (FV/PV)^1/n -1


Results:

example_data %&gt;% 
  mutate(CAGR = CAGR_formula(Values_2009, Values_2014, 4)*100)
#&gt; # A tibble: 3 x 3
#&gt;   Values_2009 Values_2014      CAGR
#&gt;         &lt;dbl&gt;       &lt;dbl&gt;     &lt;dbl&gt;
#&gt; 1       10000       19500 18.170386
#&gt; 2       10500       15000  9.326511
#&gt; 3       25000       35500  9.162151

# If Percentage is needed use the below mutate instead
#mutate(CAGR = CAGR_formula(Values_2009, Values_2014, 4)*100)