screenPage(head = NULL, sub = NULL, foot = NULL,
date = FALSE, dateFormat = "%x", time = FALSE,
topLeft = character(0), topRight = character(0),
headFont = par("font.main"), subFont = par("font.sub"),
footFont = par("font"),
cex = 1.001, headCex = 1.5, subCex = 0.85,
footCex = 0.75, topLeftCex = 0.85, topRightCex = 0.85,
footAlign = 0,
leftMargin = 0, rightMargin = leftMargin,
topMargin = 0, bottomMargin = topMargin)
length(head) > 1
, a multi-line main title results.head
.TRUE
, put the current date in the upper right corner of
the page.strptime
-style format to use if date
is TRUE
.
The default formats dates like 11/30/2006. What is actually being
formatted is the value returned by Sys.time()
, so you can
also use time formatTRUE
, put the current time in the upper right corner of
the page. If date
is also true, the time string will be on
the line below the date string.head
. The default
uses whatever par("font.main") is set to.sub
. The default uses
whatever par("font.sub") is set to.foot
. The default
uses whatever par("font") is set to.head
. The actual cex used will be cex * headCex
.sub
. The actual cex used will
be cex * subCex
.foot
. The actual cex used will
be cex * footCex
.cex * topLeftCex
.cex * topRightCex
.foot
. 0
means left
justify, 1
means right justify, 0.5
means to center
the text. Other numbers are a corresponding distance between the
extremes.leftMargin
topMargin
screenPage
first sets aside space for the margins specified by
topMargin
, bottomMargin
, leftMargin
and
rightMargin
. Then it figures out how much additional space is
needed for the top and bottom outer margin text elements, places them,
and then splits the screen in 3, with screen 3 being the middle part
of the page. The user is then free either to further subdivide screen
3 (using split.screen()
) or to use it as is.
On exit, screen 3 is the active screen.split.screen
screenPage(head = "Chart 1", date = TRUE, foot = rep("", 4),
cex = 0.85, headCex = 1)
## then draw charts, possibly after further subdividing the screen
Run the code above in your browser using DataLab