[Roxygen-devel] usage section in .Rd files - line breaks

Mark Heckmann mark.heckmann at gmx.de
Wed May 4 23:52:50 CEST 2011


Hi Peter,

the widths you suggested is pretty exact and it works fine.
The only problem that occurs is that if a new argument starts at one 
of the last characters of a usage line strwrap seems to keep that argument on 
the same line. The break is only introduced afterwards. This seems to be strwrap
behavior, but it would certainly be more pretty to change that.

I have another question concerning @example:
When I use multiple lines code, like e.g.

#'    addConstruct(bell2010, "left pole", "pole right", 
#'				c(3,1,3,2,5,4,6,3,7,1))

the .Rd file will look like:

addConstruct(bell2010, "left pole", "pole right", 
c(3,1,3,2,5,4,6,3,7,1))

i.e. the beginning blanks are deleted. It would be nice if the blanks at the beginning of a line would not
be trimmed in order to be able to format this part.

Bests,
Mark


Am 04.05.2011 um 21:05 schrieb Peter Danenberg:

> Quoth Mark Heckmann on Prickle-Prickle, the 51st of Discord:
>> The number characters roxygen puts in each line of the .Rd usage
>> section before setting a line break is too long, I think.
> 
> Hadley added a `strwrap' filter to usage specifying only the exdent:
> 
>  strwrap(..., exdent=4)
> 
> The width parameter is 0.9 * getOption("width") (i.e. 72 characters)
> by default; playing around with e.g. options(width=76) might help us
> find a suitable default.
> 
> Do you mind finding a suitable default; or maybe sending me a minimal
> example to work with?

–––––––––––––––––––––––––––––––––––––––
Mark Heckmann
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20110504/49816157/attachment.htm>


More information about the Roxygen-devel mailing list