Discounted payback period
discounted_payback_period.RdReturns the first duration at which cumulative discounted profit is nonnegative.
Value
An integer vector with one value for each discount rate. An element
is NA_integer_ when payback is not reached.
Examples
Pi <- c(-15.00, 8.42, 8.39, 8.58)
discounted_payback_period(Pi, r = 0.10)
#> [1] 3