Question: n your RStudio interface, open a new R Script window. (Check Lesson 1.2.4 for instructions on running R scripts.) Define an R function named fv()

n your RStudio interface, open a new R Script window. (Check Lesson 1.2.4 for instructions on running R scripts.) Define an R function named fv() that calculates the future value of an investment with the following three arguments: pmt: the amount of investment in each period (required) r: the interest rate per period (required) n: the number of periods (optional with the default value of 12) where the future value is calculated by: = (1 ) 1 Please make sure your function rounds the answer to the nearest hundredth. Execute your codes to define the function. Write an R statement in your script window to test it using pmt = 100 and r = 0.05. Your function should return 1591.71

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!