[R] vignettes: .png graphics or pre-compiled .pdf

Michael Friendly friendly at yorku.ca
Fri Nov 13 17:02:03 CET 2009


In a package I'm working on there is a vignette with a number of graphs 
that result in huge .pdf files, so
the .pdf for the vignette is around 17 Mb.  If these graphs are 
converted to .png, and the .tex file
is compiled with pdflatex, the resulting .pdf is ~1 Mb.

I'm reluctant to put the .Rnw file into the package as is, generating 
the huge .pdf for the vignette.
I first tried installing the smaller .pdf file in the package by itself 
(no .Rnw)
together with a file inst/doc/index.html as recommended
in 'Writing R Extensions.'  However, when the package is installed, 
vignette() can't find it

 > vignette(package="Guerry")
no vignettes found
 > vignette("MultiSpat")
Warning message:
vignette 'MultiSpat' *not* found

Alternatively, is there a way to generate .png graphs from the .Rnw file 
so that those are used in building
the .pdf for the package?  AFAICS, \SweaveOpts{} offers only the choices 
of eps/pdf = {TRUE/FALSE}.

-Michael

-- 
Michael Friendly     Email: friendly AT yorku DOT ca 
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA




More information about the R-help mailing list