context("Calculating future value of an investment")
test_that("future value calculates correctly", {
expect_equal(future_value(1000, 0.05, 1), 1050)
expect_equal(future_value(1000, 0.08, 4), 1360.489, tolerance = 1e-3)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.