discount | R Documentation |
Discount a Quantity Over Time
discount(x, r, first = FALSE, period = 1)
x |
numeric. A quantity to discount. |
r |
discount rate. |
first |
logical. Should discouting start at the first value ? |
period |
Number of cycle per unit of discount rate. |
A numeric vector of the same length as x
.
discount(rep(10, 5), .02) discount(rep(10, 5), .02, first = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.