[R] Test for new page
ray at mcs.vuw.ac.nz
Wed Nov 12 00:27:58 CET 2003
Marc Schwartz <MSchwartz at medanalytics.com> wrote:
> On Tue, 2003-11-11 at 16:49, Paul Murrell wrote:
> > Hi
> > Aleksey Naumov wrote:
> > > Dear R experts,
> > >
> > > I am writing a multi-page PDF file and would like to put a header on each
> > > page. Is there a way to test a graphic device to see if a new page is started
> > > (so that I know when to write the header)?
> > Sorry. Not that I can think of.
> > Paul
> > > I could simply count the plots made (each page has the same number of plots),
> > > but wanted to see if a more general solution is available.
> I was trying to think of a way but could not either.
It's not clear what you want as the "header", but if it is the same on
each page, then using mtext("Header", outer=TRUE) (after a suitable
par(oma=c(0, 0, 1, 0))), you can just write the header after every plot.
More information about the R-help