# three ways to input values pv_f<-function(fv,r,n)fv/(1+r)^n # method 1: pv_f(100,0.08,1) # [1] 92.59259 # Method 2: keyword approach pv_f(fv=100,n=1,r=0.08) pv_f(n=1,r=0.08,fv=100) pv_f(fv=100,r=0.08,n=1) # Method 3: mixed approach # consider the keywords first # then consider the order pv_f(n=1,100,0.08) #[1] 92.59259 pv_f(fv=100,0.08,1) # [1] 92.59259