2013-01-17 63 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