# NOT RUN {
library(iemisc)
# Example 4-20 from the Reference text (pages 153-154)
AgivenG(1000, 4, 15, "annual") # the interest rate is 15%
# Example 4-31 from the Reference text (pages 166-167)
AgivenG(1000, 4, 20, "semiannual") # the nominal interest rate is 20% compounded semiannually
# }
Run the code above in your browser using DataLab