if (require("testthat")) {
pkg <- "McMasterPandemic"
require(pkg, character.only = TRUE)
print(sessionInfo())
test_check(pkg, reporter = "summary")
print(warnings()) ## TODO? catch most of these by expect_warning(..)
} else {
warnings(
"Package 'testthat' not available, cannot run unit tests for package",
sQuote(pkg)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.