discount | R Documentation |
Discount a Quantity Over Time
discount(x, r, first = FALSE, time = seq_along(x))
x |
numeric. A quantity to discount. |
r |
discount rate. |
first |
logical. Should discouting start at the first value ? |
time |
numeric. Time values over which to discount, defaults to counting sequence of same length as x. |
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.