2013-01-17 58 views
10

这比烦恼更麻烦,但是有什么办法可以防止在编译R中的文档和一行太长时发生的行“溢出”?防止R文档中的行溢出?

R CMD Rd2pdf [options] files创造了一些文件的一个片段: A snippet of documentation with text going outside the document margins (grey bars show the width of the pdf document)

我找不到任何地方这样的记载,以及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) 

回答

0

对不起,扰流板:一解决方案是不是使用roxygen2 在extremis为包裹维护。为什么不手动维护你的描述?你不需要很多的改变,它看起来好多了......

绝大多数软件包并不需要'分类'。 为什么不遵循许多Bioconductor软件包的传统,'Matrix'等, 将S4类定义(包括引用类)放在文件'AllClasses.R'中,也可能使用'AllGenerics.R',其余的,整理顺序应该不重要。

+1

我遇到同样的问题。我试图手动更新描述文件,但collat​​e字段仍然在pdf输出中溢出。我使用普通的R CMD INSTALL [软件包名称]和R CMD检查[软件包名称]。然后我从[package name] .Rcheck文件夹中取出pdf。 – JAponte