Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making an R package PDF manual using devtools

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

like image 851
a1b2d3d4 Avatar asked Jun 02 '15 22:06

a1b2d3d4


People also ask

How do I code an R package?

Open a new project in RStudio. Go to the 'File' menu and click on 'New Project. ' Then select 'New Directory,' and 'R Package' to create a new R package.

What does R CMD check do?

R CMD check automatically checks your code for common problems. It's essential if you're planning on submitting to CRAN, but it's useful even if you're not because it automatically detects many common problems that you'd otherwise discover the hard way.


2 Answers

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))) 
like image 152
Tyler Rinker Avatar answered Oct 17 '22 13:10

Tyler Rinker


There is

devtools::build_manual() 

Maybe also

devtools::check(manual=TRUE) 

could work.

like image 28
user7669 Avatar answered Oct 17 '22 13:10

user7669