loan | R Documentation |
Calculate the installments, interest, principal and debt balance for each period of a loan.
loan(AMOUNT,RATE,PER)
AMOUNT |
Amount of the loan (Numeric Variable). |
RATE |
Loan's periodic interest rate (Numeric Variable). |
PER |
Periods to maturity (Numeric Variable). |
A list with 2 data.frames: (1) Summary, presenting the installment and the repayment amount. (2) Amortization Table for all periods of the loan until maturity.
Pavlos Pantatosakis.
R implementation and documentation: Pavlos Pantatosakis pantatosakisp@yahoo.com.
Ehrhardt, M. C. and Brigham, E. F. (2011). Corporate finance: A focused approach. South-Western Cengage Learning. p. 156-160 - ISBN: 1439078084
idm
##
# Example usage
example <- loan(
AMOUNT = 100000, # 100.000 currency units loan
RATE = 0.05, # 5 % periodic interest
PER = 4 # 4 periods to maturity
)
print(example)
# Another example
example2 <- loan(
AMOUNT = 1000, # 1.000 currency units loan
RATE = 0.20, # 20 % periodic interest
PER = 3 # 3 periods to maturity
)
print(example2$AmortizationTable) # For amortization table
print(example2$AmortizationTable[5]) # Balance for each period
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.