| plcond | R Documentation |
A scatterplot matrix is generated that shows, in each
panel, the relationship between two primary variables, with the
dataset restricted by appropriate subranges of two 'conditioning'
variables.
This corresponds to link{coplot}.
The points that are near to the the 'window' defining the panel's
restriction are also shown, in a distinct style.
plcond(x, y = NULL, condvar = NULL, data = NULL,
panel = NULL, nrow = NULL, ncol = NULL,
xaxmar = NULL, yaxmar = NULL, xlab = NULL, ylab = NULL,
oma = NULL, plargs = NULL, ploptions = NULL, assign = TRUE, ...)
x, y |
the two variables used to generate each panel.
They may be specified as vectors, as column names of |
condvar |
two (or one) variables that define the restrictions of the data for the different panels. A numerical variable is cut into intervals, see Details. A factor defines the 'ranges' as its levels. For each combination of intervals or levels of the two variables, a panel is generated. |
data |
data.frame in which the variables are found if needed |
panel |
function that generates each panel.
If set by the user, it must accept the arguments
|
nrow, ncol |
number of maximum rows and columns on a page |
xaxmar, yaxmar |
margin in which the axis (tick marks and
corresponding labels) should be shown: either 1 or 3 for
|
xlab, ylab |
labels of the variables |
oma |
width of outer margins, see |
plargs |
result of calling |
ploptions |
list of pl options. |
assign |
logical: Should the plargs be stored in |
... |
further arguments passed to the |
A numerical conditioning variable (condvar) will be
split by default into classes by splitting its robust range
(robrange) into ploptions("plcond.nintervals")
equally long intervals. Alternatively, the variable may contain
an attribute cutpoints which then defines the intervals.
For numerical conditioning variables, each panel also shows
neighboring points with a different color and diminished size.
The size of the neighborhood is defined by the proportion of extension
ploptions("plcond.ext").
The point size of the respective 'exterior' points is given by
ploptions("plcond.cex") The color are given by
the 4 elements of ploptions("plcond.col"):
The first element is used to paint the neighboring points
to the left of the current range of the conditioning x variable,
the second element paints those to the right,
and the third and fourth are used in the same way for the
conditioning y variable. The neighboring points that are outside
both ranges get a color mixing the two applicable colors according to
this rule.
Finally, paling is applied to these colors with a degree that is
linear in the distance from the interval, determined by the range
given by ploptions("plcond.pale").
None.
Werner A. Stahel
coplot
plcond(Sepal.Width~Sepal.Length, data=iris, condvar=~Species+Petal.Length)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.