| gplotArgs.data.frame {latticeExtra} | R Documentation |
Extract arguments suitable for gplot from a data.frame with appropriate meta-data
## S3 method for class 'data.frame':
gplotArgs(x, display.formula,
outer = FALSE, inner = FALSE, ...)
## S3 method for class 'data.frame':
gplotArgs(x) <- value
x |
an object of class ``data.frame'' |
display.formula |
a Trellis display formula |
outer |
logical or one-sided formula |
inner |
logical or one-sided formula |
... |
extra arguments, passed on as appropriate |
value |
a list containing named components, to be stored as special
attributes of x, including but not limited to
These are modeled on the groupedData function in package
nlme, and are stored as meta-data in the data frame
x. The components listed above are special in the sense that
they are used by the corresponding gplotArgs method to
contruct a suitable list as descibed in
gplotArgs.default. Any other components in
value can be used to override the values thus constructed,
including display.formula.
|
The gplotArgs method for data frames constructs a suitable list
as descibed in gplotArgs.default. The
display.formula argument can be used to specify the Trellis
formula used (usually, it will be constructed from the meta-data).
For the role of outer and more details, consult nlme
documentation for now.
gplotArgs should return a list.
Deepayan Sarkar
gplotArgs.data.frame, gplotArgs<-.data.frame
dplot
gplotArgs(iris) <-
list(formula = Sepal.Length ~ 1 | Species,
order.groups = TRUE,
labels = list(Sepal.Length = "Sepal\nLength",
Sepal.Width = "Sepal\nWidth"))
gplot(iris)
gplot(iris, display.formula = Sepal.Length ~ Sepal.Width | Species)
R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(latticeExtra)
> png(filename="images/gplotArgs.data.frame_%03d.png" ,width=480, height=480)
> ### Name: gplotArgs.data.frame
> ### Title: Grouped Display Arguments from a Data Frame
> ### Aliases: gplotArgs.data.frame gplotArgs<-.data.frame
> ### Keywords: dplot
>
> ### ** Examples
>
> gplotArgs(iris) <-
+ list(formula = Sepal.Length ~ 1 | Species,
+ order.groups = TRUE,
+ labels = list(Sepal.Length = "Sepal\nLength",
+ Sepal.Width = "Sepal\nWidth"))
> gplot(iris)
> gplot(iris, display.formula = Sepal.Length ~ Sepal.Width | Species)
>
>
>
> dev.off()
null device
1
>