Making an R package PDF manual using devtools

a1b2d3d4 picture a1b2d3d4 · Jun 3, 2015 · Viewed 8.3k times · Source

I am making an R package using devtools and roxygen2. I can get a PDF manual using R CMD but I am really curious as to whether this can be done using devtools. devtools' build(), check(), install() all don't make a PDF manual. Is this tied to making vignettes?

I have read and referred to a similar thread Package development : location of pdf manual and vignette

Answer

Tyler Rinker picture Tyler Rinker · Jun 3, 2015

After you install it, you can use:

pack <- "name_of_your_package"
path <- find.package(pack)
system(paste(shQuote(file.path(R.home("bin"), "R")),
    "CMD", "Rd2pdf", shQuote(path)))