powered by
discount(x, r, first = FALSE)
x
discount(rep(10, 5), .02) discount(rep(10, 5), .02, first = FALSE)
Run the code above in your browser using DataLab