# Unittest ----
datadir_get <- function(subdir = "") {
wd <- getwd()
if (grepl("testthat", wd)) {
datadir <- "data"
}
else {
datadir <- file.path("tests", "testthat", "data")
}
file.path(datadir, subdir)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.