discount(rep(10, 5), .02)
discount(rep(10, 5), .02, first = FALSE)
discount(1000, .05, time = 10)
discount(1000, .05, period = 2, time = 1:10)
discount(1000, .05, period = 2, time = 1:10, linear = TRUE)
Run the code above in your browser using DataLab