Skip to contents

Create a chronicle of weights corresponding to discount rates

Usage

discount_weight(h = 0:50, ...)

Arguments

h

vector (integer) of years.

...

other parameters.

Value

vector of discount weights

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org

Examples


w_constant = discount_weight()
w_2013 = discount_weight(rate = "quinet2013")
w_2005 = discount_weight(rate = "cgp2005")

year = as.integer(format(Sys.Date(), "%Y"))
year = seq(year,  year + length(w_constant) - 1)
plot(year, w_2005, type = "l", col = "red", ylim = c(0, 1))
lines(year, w_constant, col = "black")
lines(year, w_2013, col = "blue")