You are looking for cumprod :
cumprod(rep(1.2, 5))
Like his more famous friend, cumsum , he accumulates past results, but performs multiplication, not addition.
df <- data.frame(assumption_val=cumprod(rep(1.2, 5)), years=2015:2019)
A good generalization of these functions is Reduce . For example, here Reduce performs this calculation. You can replace "*" with "+" and have cumsum .
Reduce("*", rep(1.2, 5), accumulate = T)
A good feature of this method is that you can adjust the growth rate in each period. For example, if you want to start with 1.5, not 1.2, you simply adjust your growth vector to c(1.5, rep(1.2, 4)) to calculate the new growth as follows:
cumprod(c(1.5, rep(1.2, 4)))
source share