| npv | R Documentation | 
Discounted value of future cash flows; the date of the first cash flow is considered as origin.
npv(
  irate,
  cashflows,
  dates,
  method = "compound",
  convention = "ACT/365",
  silent = FALSE
)
irate | 
 Interest rate per annum. Either a scalar value, or vector.  | 
cashflows | 
 Cash flows, as a vector.  | 
dates | 
 Value dates for the cashflows vector.  | 
method | 
 Compound or simple interest? Default is compound.  | 
convention | 
 Interest rate convention; default is "ACT/365".  | 
silent | 
 Should warning messages be suppressed? Default is no.  | 
Net present value of future cash flows
dcf
one_thousand <- npv(
  irate = 10 / 100, # i.e. 10% p.a.
  dates = as.Date(c("2019-01-01", "2020-01-01")), # i.e. one year
  cashflows = c(0, 1100)
)
cat(one_thousand)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.