[R] Sweave in packages

Jari Oksanen jarioksa at sun3.oulu.fi
Wed Oct 30 16:00:28 CET 2002


Dear R folks, 

One of the fantastic new tools in R is `Sweave'. I have tested it so much that I
know it works and produces fine documentation, and with (GNU) Emacs/ESS it is
nice to work with, too. I started to have a look at including some Swoven (is
that a strong verb?) documentation with my R package, but it seems that there is
no model to copy among those packages that I have installed in my R. Has anybody
used Sweave for package vignettes? I have run into some minor inconveniences,
where I would appreciate hints:

- I cannot find out in R-exts manual how to actually write \VignetteIndexEntry 
so that it would be incorporated into 00Index.dcf. Should you put the entry 
within braces (LaTeX way) or use colon or something before the entry 
(00Index.dcf instructions)? Actually, I cannot get much of an 00Index.dcf: If I 
use --force to build the package, the 00Index.dcf will be replaced with an 
empty file (size 0 bytes). Further, I haven't figured out how to transfer the 
\VignetteIndexEntry to the ultimate pdf file. All my attempts to write the 
00Index.dcf file manually have ended with R sarcastically saying to me that 
my index is not up-to-date and writing over my file with an empty file 
(obviously I should be more careful in my hand writing...). 

- It seems that it is necessary to use Makefile because R CMD BUILD doesn't
clean the inst/doc directory from the interim files Sweave produces to build the
pdf (foo-???.eps, foo-???.pdf, LaTeX files like foo.blg, foo.bbl, foo.aux,
foo.log, etc). Is there any other solution here? 

- Is it indeed the purpose that the final document should be a pdf file even in
source packages. The pdf files tend to become huge, and easily multiply the size
of a source package. As I have a 56KB modem at home (working at ~5KB file
transfer speed in practice) I am really concerned with this aspect as well (it
doesn't concern me at all when at work). Is the assumption that users won't have
tools to build a pdf from the Sweave source?

cheers, jari oksanen
-- 
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
Ph. +358 8 5531526, cell +358 40 5136529, fax +358 8 5531061
email jari.oksanen at oulu.fi, homepage http://cc.oulu.fi/~jarioksa/


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list