cat_line <- function(..., indent = 0L, indent_char = " ") {
pad <- strrep(indent_char, indent)
out <- paste0(pad, ..., collapse = "\n")
cat(out, "\n", sep = "")
}
assert_package <- function(pkg) {
if (!requireNamespace(pkg, quietly = TRUE)) {
stop("Missing required package ", pkg, call. = FALSE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.