#' Present value factor of an annuity
#'
#' @param rate Interest rate.
#' @param periods Number of periods.
#' @return Present value per dollar that is received in the future
#' @examples
#' present_value_factor(0.05, 2)
#' present_value_factor(0.10, 7)
#' @export
annuity_present_value_factor <- function(rate, periods) {
pvf <- ((1 - 1 / (1 + rate) ^ periods) / rate)
return(pvf)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.