Learn R Programming

heemod (version 0.3.0)

discount: Discount a Quantity Over Time

Description

Discount a Quantity Over Time

Usage

discount(x, r, first = FALSE)

Arguments

x
numeric. A quantity to discount.
r
discount rate.
first
logical. Should the discouting start at the first value ?

Value

  • A numeric vector of the same length as x.

Examples

Run this code
discount(rep(10, 5), .02)
discount(rep(10, 5), .02, first = FALSE)

Run the code above in your browser using DataLab