[R] Dynamically switching lattice device characteristics in Sweave under Makefile control

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Tue, 24 Jun 2008 17:00:13 -0500

I am indebted to Deepayan Sarkar for lattice graphics, Fritz Leisch for Sweave and the authors of the beamer package for LaTeX. For me these are a "killer app" combination. I wouldn't want to go back to creating presentations in any other way.

When I create a presentation I use a Makefile that allows me to the presentation version of the slides, a 4-up version for printing on letter paper and a 4-up A4 version. Sample files can be found at http://www.stat.wisc.edu/~bates/IMPS2008

When creating the printable versions I want to invoke something like

lattice.options(default.theme = standard.theme(color = FALSE))

in the "preliminaries" chunk so the 4-up slides can be printed on a black-and-white printer without losing too much information. I haven't worked out a way of passing this information in to the individual sections yet. I would welcome suggestions. If you look in the Makefile you will see that there is a fooD.tex and a fooH.tex file controlling whether the display or the other one (I forget why I called it H) is active. That is how I control the beamer stuff. The problem for me is that the device characteristics need to be controlled in the individual .Rnw files

Should you be inclined to read the content of the slides (and do bear in mind that they are a work in progress, to be presented on Sunday) I will tell you I am particularly proud of the slide entitled "Definition of linear mixed-effects models" (about slide 13 - depending on how you count). In one slide that describes a very general form of the model.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 24 Jun 2008 - 22:04:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Jun 2008 - 01:31:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive