pmt: Annuity payment

View source: R/pmt.R

pmtR Documentation

Annuity payment

Description

Calculation of annuity payment.

Usage

pmt(irate, nper, pv, fv = 0, type = "immediate", silent = FALSE)

Arguments

irate

Interest rate per period (see nper) as fraction (i.e. 5% is .05 or 1/20)

nper

Number of interest periods as integer (no fractions)

pv

Present value

fv

Future value (default is zero)

type

type of the annuity: due or immediate?

silent

Should warning messages be suppressed? Default is no.

Details

The function expects a single interest rate; number of periods, present and future values can be vectors, and in such case a vector would be returned.

Value

annuity payment

Source

builds heavily on https://gist.github.com/raadk/dcd503815bbb271484ff

Examples

pmt(.1, 5, -1000) # a loan of 1000 units to be repaid in 5 periods at 10\% per period



jla-data/TVM documentation built on Feb. 3, 2024, 8:48 p.m.