test_that("my_lm works mathematically", {
expect_equal(my_lm(formula = lifeExp ~ gdpPercap + continent, data = my_gapminder)[, 1],
summary(lm(formula = lifeExp ~ gdpPercap + continent, data = my_gapminder))$coefficients[, 1])
})
test_that("wrong alternative input throws error", {
expect_error(my_lm("formula = lifeExp ~ gdpPercap + continent", data = my_gapminder))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.