InterestRate | R Documentation |
Calculates the final capital, after compounding interest
InterestRate(initialCapital, interest, days)
initialCapital |
Numeric value of initial capital |
interest |
Numeric value of the interest rate |
days |
Numeric value of days, for time of accumulation |
Calculates the final capital through the formula P \times \left(1 + \frac{r}{100}\right)^t
,
where P = initialCapital
, r = interestRate
, t = \frac{days}{365.25}
Final capital value, given by the formula above
Michael Thrun
initialCapital = 25000
interestRate = 2
days = 365
finalCapital = InterestRate(initialCapital,interestRate,days)
compoundedInterest = finalCapital - initialCapital
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.