Re: [R] Sweave and \input or \include LaTeX commands

From: Gabor Grothendieck <ggrothendieck_at_myway.com>
Date: Tue 01 Mar 2005 - 23:08:25 EST

 <Friedrich.Leisch <at> tuwien.ac.at> writes:

> I currently also plan only a \SweaveInput{},

I agree that its clearer to keep the two systems distinct rather than having subtle changes in functionality depending on the extension of the file in \input.

While we are discussing I just wanted to bring two related points up regarding how Sweave and R CMD interact.

  1. As mentioned in a previous post in this thread, if I don't want R CMD CHECK to process a certain portion of my vignette (since its involves lengthy processing or software that might not be available on other systems) I place that portion into a file called sub, say, with no extension so that R CMD CHECK does not know its a Sweave file (and therefore automatically process it). I then process it manually with Sweave: Sweave("sub") and in my main file, main.Rnw, have an input statement

\input{sub.tex}

The only thing that's a bit confusing is that sub has no extension but otherwise this has the intended effect of letting me circumvent the R CMD CHECK for sub. This is all ok, it works fine, but I was just wondering if there are any clearer ways of achieving this effect. I guess I could use an extension such as .Rnw-hide or use the .Rbuildignore file to mask it (although using .Rbuildignore in that way has the disadvantage that it would be entirely excluded from the build) but was just wondering if there is some standard way of dealing with this situation.

2. A second problem that is related is that I think there should be an easy way to include a .pdf vignette that was not generated by Sweave or even latex. Currently, as I under it, one must use Sweave since the package building process uses the \VignetteIndexEntry and associated commands to know how to process the build. If this is already possible then can someone indicate how its done. Some time ago I raised this point but no one responded at that time.

The above two points relate to the interaction between the check/build and Sweave and may not even be about Sweave itself but the same problems are involved so I thought its relevant to bring all considerations in at this point.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Mar 01 23:21:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:38 EST