ploptions {plgraphics}R Documentation

Set and Get User "Session" Options that influence "regr0"s behavior

Description

The user can set (and get) "Session" options which influence the behavior plgraphics functions, notably stamp().

Usage

ploptions(x = NULL, default = NULL, list = NULL, ploptions = NULL,
          assign = TRUE,...)
.ploptions
ploptionsDefault

Arguments

x

character (vector) of name(s) of ploptions. If x is set, all further arguments will be ignored.

list

a named list of options to be set

default

character vector of option names. The named options will be set according to ploptionsDefault. default="all" or =TRUE will reset all options. If default is set and x is not, all further arguments will be ignored.

ploptions

the list of options that should be modified

assign

logical: should the list be assigned to .ploptions?

...

any ploptions can be defined or modified, using name = value, as in options of basic R.

Details

Here is a list of the components of ploptionsDefault, describing the suitable alternative values to be set by calling ploptions:
very incomplete for the time being!!!

Value

For ploptions(), a list of all set UserOptions sorted by name.

For ploptions(x), where x is the name of a pl option, a list of length one containing the option, or NULL if it is not such a name.

For uses setting one or more options, the important effect is a changed list .ploptions that is used by the pl graphical functions (if assign is TRUE). The (invisibly) returned value is the same list, complemented by an attribute "old" containing the previous values of those ploptions that have been changed. This list is useful for undoing the changes, usually at the end of graphical functions, to restore the previous status.

.ploptions and ploptionsDefault are lists of options. The first one is generated whenever ploptions are set (and assign is TRUE), and is then stored in the ".GlobalEnv" environment. The second is stored in the package plgraphics.

Note

In contrast to the options of R base, the plptions are stored in the .GlobalEnv (if anyone is changed) and will be recovered if the latter is stored and loaded again.

Author(s)

Werner A. Stahel

See Also

stamp; R's own predefined options().

Examples

## see example(stamp)
ploptions("stamp")
ploptions(c("jitterFactor", "gridlines"))

## set options
ploptions(stamp=FALSE, pch=0, col=c.colors[-1], anything="do what you want")
ploptions(c("stamp", "anything"))
ploptions(default=TRUE)
t.plopt <- ploptions(smooth.col="green", assign=FALSE)
t.plopt$smooth.col
ploptions("smooth.col") ## unchanged

[Package plgraphics version 1.0 Index]