[Roxygen-devel] usage section and long equasions

meik michalke Meik.Michalke at uni-duesseldorf.de
Thu Feb 9 15:38:29 CET 2012


Am Donnerstag, 9. Februar 2012 15:06:10 schrieb Hadley Wickham:
> 2012/2/9 meik michalke <Meik.Michalke at uni-duesseldorf.de>:
> > Am Donnerstag, 9. Februar 2012 05:03:28 schrieb Hadley Wickham:
> >> This is a little tricky because it's hard (in general) to tell when
> >> whitespace matters (i.e. inside a string) and when it doesn't (between
> >> commas of a list).
> > 
> > sure, but couldn't roxygen2 just ignore spaces inside quotes, then? even
> > if it didn't, there're obviously two alternatives: *possibly* seeing a
> > line break to many in the PDF, or *definitely* not seeing most of the
> > other options at all. i'd prefer it the first way ;-)
> 
> Well, it _could_, but that would involve writing a parser because
> strings are complicated! i.e. where are the valid breaking spaces in
> this vector:
> 
> c(" ", ' ', "' '", "\" \"", "\\ ")

in theory, i see the problem. allthough i'd suggest to break lines after 
commas only, so the only problematic case would be a comma followed by space 
inside a quote:

 c(" ", ' ', "', '", "\" \"", "\\ ")

but still, even if we ignored this for the time being, i fail to see the 
benefit that the current state

 c(" ", ' ', "', '

has over the proposed

 c(" ", ' ', "',
  '", "\" \"",
  "\\ ")

sure this isn't perfect either, but at least you get to see the rest of the 
vector. so i'd consider this an improvement, nonetheless. it should work in 
almost all of the cases, because it would only apply to options which are too 
long anyway, and what are the odds that these also have a quoted comma+space 
exactly in the problematic place?


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20120209/7c65eb95/attachment.pgp>


More information about the Roxygen-devel mailing list