From murdoch at stats.uwo.ca  Sun Jun 21 19:17:49 2009
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sun, 21 Jun 2009 13:17:49 -0400
Subject: [Rd] Changes to Rd handling in R-devel
In-Reply-To: <4A3C1B57.4040708@stats.uwo.ca>
References: <4A3C1B57.4040708@stats.uwo.ca>
Message-ID: <4A3E6B3D.80608@stats.uwo.ca>

On 19/06/2009 7:12 PM, Duncan Murdoch wrote:
> I've just committed some fairly big changes to R-devel. 
>   - There's a new tag \Sexpr which allows R code to be embedded within 
> the Rd file, similar to Sweave,  \RdOpts
>     corresponds to \SweaveOpts.
>   - The parser now mainly issues warnings, rather than errors, in case 
> of syntax errors.  It throws away a few tokens and tries to restart.  
> This should let you see most of your errors in one pass, rather than one 
> at a time.  (Don't ignore the warnings -- you've lost some of your file 
> if you get them!)  (Romain:  yes, this is done using the special "error" 
> token in bison.)
>   - There are also a number of bug fixes to the rendering code (e.g. 
> Rd2HTML).  I'm hoping to switch over soon to the new parser being used 
> to produce all man pages.
> 
> I need to write up more about \Sexpr, 

I've started the writeup, as a new section of the parseRd.pdf file on 
developer.r-project.org.

Duncan Murdoch


but the basic idea is that the
> format is
> 
> \Sexpr{R code}
> 
> or
> 
> \Sexpr[options]{R code}
> 
> Currently the R code is not executed unless you do it manually, but once 
> we're using this engine for man pages, you'll be able to choose when to 
> execute the code:  build time, install time, or render time.
> 
> I hope these changes don't introduce any bugs in old Rd files, but if 
> they do, please let me know and I'll fix them.  (Not today; I'll be 
> travelling.)
> 
> Duncan Murdoch
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Changes to Rd handling in R-devel
Duncan Murdoch