10

这比问题更令人烦恼,但是有没有办法防止在 R 中的文档被编译并且行太长时发生行“溢出”?

使用以下创建的一些文档的片段R CMD Rd2pdf [options] files一段文档的文本超出文档边距(灰色条显示 pdf 文档的宽度)

我在任何地方都找不到提到这一点,Rd2pdf 的唯一选择是:

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

1 回答 1

2

抱歉剧透:一种解决方案是在 extremis中使用 roxygen2进行包维护。为什么不手动维护您的说明?你不需要很多改变,它看起来好多了......

绝大多数包裹确实不需要“整理”。为什么不遵循许多生物导体包“Matrix”等的传统,将 S4 类定义(包括参考类)放在文件“AllClasses.R”中,也可以使用“AllGenerics.R”,其余的,整理顺序应该无关紧要。

于 2013-02-02T15:13:11.810 回答