gpt4 book ai didi

r - 本地 R 包的 PDF 文档

转载 作者:行者123 更新时间:2023-12-01 14:07:45 24 4
gpt4 key购买 nike

我使用 roxygen2 创建了一个本地 R 包和 devtools .看起来效果很好,但我想知道我是如何获得完整的 PDF 文档的。由于 description 和 .Rd 文件是由 roxygen2 自动创建的,我认为有一种简单的方法可以将它们转换为单个 PDF 文档。

最佳答案

我想这里有一个命令给你:R CMD Rd2pdf .从它的帮助:

edd@max:~$ R CMD Rd2pdf --help
Usage: R CMD Rd2pdf [options] files

Generate PDF output from the Rd sources specified by files, by
either giving the paths to the files, or the path to a directory with
the sources of a package, or an installed package.

Unless specified via option '--output', the basename of the output file
equals the basename of argument 'files' if this specifies a package
or a single file, and 'Rd2' otherwise.

The Rd sources are assumed to be ASCII unless they contain \encoding
declarations (which take priority) or --encoding is supplied or if using
package sources, if the package DESCRIPTION file has an Encoding field.
The output encoding defaults to the package encoding then to 'UTF-8'.

Files are listed in the order given: for a package they are in alphabetic
order of the \name sections.

Options:
-h, --help print short help message and exit
-v, --version print version info and exit
--batch no interaction
--no-clean do not remove created temporary files
--no-preview do not preview generated PDF file
--encoding=enc use 'enc' as the default input encoding
--outputEncoding=outenc
use 'outenc' as the default output encoding
--os=NAME use OS subdir 'NAME' (unix or windows)
--OS=NAME the same as '--os'
-o, --output=FILE write output to FILE
--force overwrite output file if it exists
--title=NAME use NAME as the title of the document
--no-index don't index output
--no-description don't typeset the description of a package
--internals typeset 'internal' documentation (usually skipped)

The output papersize is set by the environment variable R_PAPERSIZE.
The PDF previewer is set by the environment variable R_PDFVIEWER.

Report bugs at bugs.r-project.org .
edd@max:~$

关于r - 本地 R 包的 PDF 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23502380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com