# Lint
if (!require(styler, quietly = TRUE)) {
install.packages("styler")
}
docOrg <- lapply(dir("R", pattern = "*.R", recursive = TRUE, full.names = TRUE), readLines)
styler::style_pkg(filetype = c("R", "Rmd"))
styler::style_dir("inst", filetype = c("R", "Rmd"))
docNew <- lapply(dir("R", pattern = "*.R", recursive = TRUE, full.names = TRUE), readLines)
# Test
if (!identical(docOrg, docNew)) {
stop("Lint was not performed, try running styler::style_pkg().")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.