Making an R package PDF manual using devtools

早过忘川 提交于 2019-11-29 21:37:02

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)))

There is

devtools::build_manual()

Maybe also

devtools::check(manual=TRUE)

could work.

For the PDF manual of one specific function, you can run

fun <- "name_of_function"
help(fun, package = "name_of_package", help_type = "pdf")
system(paste0("open ",  fun, ".pdf"))

assuming you have the package installed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!