| 4.2.plot.structure.handlers | R Documentation |
Function(s) for handling (front end) plot arguments like x and strip that manage the plot structure.
formulaHandler(x, data = NULL, groups = NULL, ...,
expand.plot.args = TRUE, formula.type = "z~x*y|cond", panel.zcases = FALSE,
coord.conversion = NULL, lattice.like = NULL, check.xy.dimensions = TRUE,
check.coord.dimensions = TRUE, get.zcase.dimensions = TRUE,
output = "extra.args")
matrixHandler(x, data = NULL, row.values=NULL, column.values=NULL,
...)
stripHandler(..., striplab=NULL)
getZcaseDimensions(...)
x |
(For |
data |
If supplied, the assumed source of the elements of formula
|
groups |
If supplied, the grouping argument to be used with
|
... |
Additional arguments are passed on to related functions. |
expand.plot.args |
For |
formula.type |
For |
panel.zcases |
For |
coord.conversion |
For |
lattice.like |
For |
check.xy.dimensions, check.coord.dimensions |
For |
get.zcase.dimensions |
For |
output |
For |
row.values, column.values |
For |
striplab |
For |
formulaHandler manages the formula component or x element of
of loa plot functions.
For example, for loaPlot it assumes the general formula structure
z ~ x * y | cond, and applies it in a similar fashion to the
lattice function levelplot.
Within the formula part of the plot call x and y are the
horizontal and vertical axes, z is any additional information to be
used in point, symbol, surface or glyph generation, and cond any
additional conditioning to be applied. (The coordinates, x and
y, are required elements; z and cond are typically
optional.)
matrixHandler converts a matrix supplied as x element of a
loa plot to a formula and associated data. If row.values and
column.values are supplied, these are used as (x,y)
values for the supplied matrix.
stripHandler manages the strip component of loa plot functions.
getZcaseDimensions tracks the dimensions of multiple z
formulaHandler returns a list, containing the plot elements
defined in the supplied formula.
matrixHandler returns a list containing all supplied arguments,
subject to the following modifications: matrix x converted to formula
(z~x*y); data, replaced with supplied matrix content;
xlim and ylim, added is not suppied.
stripHandler returns a list containing all supplied arguments,
subject to the following modifications: strip, Updated or generated
if not supplied; striplab, added to strip via the strip
argument var.name, if this is undeclared in call.
getZcaseDimensions returns a list containing all the supplied
arguments, plus two additions arguments (if supplied in the call):
zcase.zlim and z.rowsum.lim. zcase.zlim is a
list of lim values, one for each zcase.
z.rowsum.lim is the range of 'by-row' sums of zcases.
These are calculated using any zcase information supplied in
the call.
These function are in development and may be subject to changes.
The current version of formulaHandler includes code from the
stats function get_all_vars. It operates in a similar
fashion to the previous version but checks zcase dimensions.
The previous version of formulaHandler was a wrapper for
the lattice function latticeParseFormula. This
version of formulaHandler was updated to simplify multiple
z argument handling.
The latest version of formulaHandler includes more flexible
formula.type handling. For example, it can now handle formulas
that have more than two coordinates. As a result the
check.xy.dimensions argument was replaced with a
check.coord.dimensions argument. The previous argument
will however remain in the function formals and function as before
until all related code has been updated.
The latest version of formulaHandler uses getZcaseDimensions
to calculate the dimensions of z if it is multi-part, e.g.
z1 + z2 + etc ~ x * y rather than z ~ x * y.
The current version of matrixHandler is based on code from
levelplot.matrix in lattice. If used with x and
data arguments it will overwrite data with the matrix
content.
Karl Ropkins
This function makes extensive use of code developed by others.
lattice: Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R. Springer, New York. ISBN 978-0-387-75968-5
In loa: loaPlot; panelPal
In other packages: levelplot in lattice.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.