[R] Test for new page: thanks
naumov at acsu.buffalo.edu
Thu Nov 13 20:41:40 CET 2003
Thank you Paul, Marc, and Ray for helping. Alas: there seems to be no way to
test for a new page. In my simple case it is no big problem since I can just
count the number of plots made on the page so far.
Ray: yes I could probably write the header after every plot, effectively
writing on top of old header (which in my case has both text and a legend). I
was just looking for a neater way...
Thank you all!
put the same header on each page
On Tuesday 11 November 2003 06:27 pm, Ray Brownrigg wrote:
> 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.
Center for Health and Social Research
Buffalo State College
More information about the R-help