vignettes/precompile.R

# Precompile vignette
# Must move image files from top level to vignettes/ after knit

if (!requireNamespace("parglm")) stop("Remember to install parglm itself!")
# Build/install the package first (equivalent to RStudio Build > Install):
#   devtools::install()
# or:
#   pak::local_install()
# or from the shell:
#   R CMD INSTALL .

knitr::opts_chunk$set(cache.rebuild = TRUE) # uncomment to clear knitr cache
knitr::knit("vignettes/parglm.Rmd.orig", output = "vignettes/parglm.Rmd")
pngs <- list.files("img", pattern = "\\.png$", full.names = TRUE)
if (length(pngs) > 0) {
  dir.create("vignettes/img", showWarnings = FALSE, recursive = TRUE)
  file.rename(pngs, file.path("vignettes", pngs))
  unlink("img", recursive = TRUE)
}

Try the parglm package in your browser

Any scripts or data that you put into this service are public.

parglm documentation built on July 6, 2026, 5:07 p.m.