knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This is my personal package that provides the following capabilities:
pv: Computes present value
rescale: Rescales numeric vectors
psc: Includes an example data set
pv function computes the present value based on a specified future value, interest rate, and number of time periods. For example, given you have future values ranging from 1000-3000, you can compute the different present values for a 5% interest rate and a 5 year time period with:
library(myfirstpackage) pv(c(1000, 2000, 3000), r = .05, n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.