compound_interest: Calculate final principal given a rate of return

Description Usage Arguments See Also Examples

View source: R/revenue.R

Description

https://en.wikipedia.org/wiki/Compound_interest

Usage

1
compound_interest(p0, r, t, n = NULL)

Arguments

p0

original principal

r

rate of return over some period (e.g., year)

t

time the interest is applied (same units as r). Can be a scalar or a vector

n

compounding frequency. If NULL, will use continuous compounding

See Also

Other estimating revenue: present_value_stream, wsfr_lifetime_yrs, wsfr

Examples

1
2
3
4
# a wikipedia example
compound_interest(p0 = 1500, r = 0.043, t = 6, n = 4)
compound_interest(1500, 0.043, 6) # continuous
compound_interest(1500, 0.043, 0:6) # over time

southwick-associates/lifetime documentation built on Feb. 24, 2020, 9:33 a.m.