How do I convert Rd files to pdf for a package that I am creating in R?

前端 未结 4 596
悲&欢浪女
悲&欢浪女 2020-12-25 08:29

I am writing a package in R and I would appreciate some example bash code to process the Rd files to latex and then to pdf.

It is in the directory ~/mypkg/dev/. I h

4条回答
  •  [愿得一人]
    2020-12-25 09:09

    Try this. It worked for me. found from Making an R package PDF manual using devtools

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

提交回复
热议问题