test_that("Correctly locate intersection points.", {
f1 <- function(x) -0.2*x - 0.8
f2 <- function(x) x^3 - x - 1
expect_true(all.equal(intersections(f1,f2), c(1,-0.7236068,-0.2763932), tolerance = 1e-3)) # Computed analytically
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.