add comments (help) 
///////////////////////////
  The present value of one future cash flow is given below
                  FV
     pv  =  --------------
               (1+R) ^n

   pv: present value 
   fv: future value
   R : effective period rate
   n : the number of periods

///////////////////////////

Write an R function for the growing annuity 
///////////////////////////
 The present value ofa growing annuity 
                           c         (1+g)^n 
    pv(growing annuity)=  ---- [1-  ---------  ]
                          R-g       (1+R)^n

   pv: present value 
   c : the cash flow at the end of the first period 
   R : effective period rate
   g : a constant growth rate 
   n : the number of periods

///////////////////////////

Add comments (help)
///////////////////////////
Step 1: write an R function 

 The present value of a growing annuity 
                           c         (1+g)^n 
    pv(growing annuity)=  ---- [1-  ---------  ]
                          R-g       (1+R)^n

     pv: present value 
     c : the cash flow at the end of the first period 
     R : effective period rate
     g : a constant growth rate 
     n : the number of periods
 
 Step 2: add comments (help)

///////////////////////////

Generate a PVIF (Present value interest factor) table 
///////////////////////////
The present value interest factor (PVIF) is a factor that is utilized 
to provide a simple calculation for determining the present value dollar 
amount of a sum of money to be received at some future point in time.

          FV
   PV=   -------                 (1)
         (1+R)^n

   PV=FV * PVIF(R,n)             (2)
                       1
       PVIF(R,n)  =  -----       (3)
                     (1+R)^n         
   https://www.investopedia.com/terms/p/pvif.asp

   For example, FV=100, R=0.1 n=3. By applying equation (1) 
                =100/(1+0.1)^3 --> 75.13

   Alternatively, we could use 100*75.13  = 75.13
          this means that PVIF(0.1,3)=75.13

///////////////////////////