Re: [Rd] "R CMD check" with R 2.0.0

From: Paul Murrell <>
Date: Fri 08 Oct 2004 - 05:27:37 EST


Deepayan Sarkar wrote:

> On Thursday 07 October 2004 08:55, Berwin A Turlach wrote:

>>G'day all,
>>I am not sure whether I should file this as a bug report, but I
>>thought that I should make the developers of R aware of the following
>>I have just installed R 2.0.0 and when I run "R CMD check" on the
>>source of some packages, I noticed that the file
>>contains one page with two graphics overlaid. This seems to happen
>>when the first graphic is produced that uses the lattice() package.
>>I.e. as long as the examples use non-lattice graphics command, each
>>graphic is on its own page; the first graphic produced by a lattice
>>command (well, xyplot each time in the packages tested) is put on the
>>same page as the last graphic, after this, each graphic is again on a
>>page off its own regardless of whether it was produced by a lattice
>>graphics command or a non-lattice graphics command.
> I can confirm this, e.g. with 

>>xyplot(2 ~ 2)
> (not that obvious on screen because the dark background overwrites the 
> first plot). The underlying reason seems to be grid not knowing whether 
> to start a new page the first time:

>>grid.points(x = runif(10), y = runif(10), vp = viewport())
> Paul, any ideas?

Yep, it's grid causing the problem. The very first grid.newpage() on a device will not start a new page IF a traditional plot had previously been drawn on the device. This will be fixed for 2.0.1.

In the meantime, there is a simple workaround for users. On a screen device, the effect will probably not be noticed (as one of Deepayan's examples demonstrates). On a file device like PostScript, it may mean people have to rerun code and insert a grid.newpage() before the first lattice call.

Apologies for the botch-up.


Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392

______________________________________________ mailing list
Received on Fri Oct 08 06:07:49 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:20 EST