R/netPresentValue.R

netPresentValue <-
function (cashFlows, interestRate) 
{
    exponent <- 0
    presentValue <- 0
    for (item in cashFlows) {
        presentValue <- presentValue + pv(item, interestRate, 
            exponent)
        exponent <- exponent + 1
    }
    presentValue
}
AmateurECE/economics documentation built on Feb. 4, 2020, 7:31 p.m.