Ensure package elegantly handles building without suggested packages. Snippet below from R-package-devel mailin list for use with knitr
if (!requireNamespace("sug1") ||
!requireNamespace("sug2")) {
warning(call. = FALSE, "This vignette requires sug1 and sug2 to be
installed")
knitr::knit_exit()
}
Ensure package elegantly handles building without suggested packages. Snippet below from R-package-devel mailin list for use with knitr