Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent line overflow in R documentation?

This is more of an annoyance than it is a problem, but is there any way to prevent the line "overflow" that occurs when documentation in R is compiled and a line is too long?

A snippet of some documentation created with 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)

I can't find mention of this anywhere, and the only options for Rd2pdf are:

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)
like image 416
Andy Barbour Avatar asked Jan 17 '13 01:01

Andy Barbour


1 Answers

Sorry for the spoiler: One solution is not using roxygen2 in extremis for package maintenance. Why not maintain your DESCRIPTION manually? You don't need many changes and it looks so much better...

The 'Collate' is really not needed for the vast majority of packages. Why not follow the tradition of many bioconductor packages, 'Matrix' etc, of putting S4 class definitions (including reference classes) in a file 'AllClasses.R' and maybe use 'AllGenerics.R' as well, and for the rest, collation order should not matter.

like image 103
Martin Mächler Avatar answered Sep 28 '22 18:09

Martin Mächler