Description Usage Arguments Details Value Author(s) References See Also Examples
Interactively explore a data set using Lattice displays.
1 2 3 4 5 |
dat |
a |
spec |
a list specifying the initial latticist display.
See |
reorder.levels |
if |
use.playwith |
whether to launch as a toolbar for |
... |
further arguments specific to the interface type. For the
|
Latticist is a graphical user interface for exploratory visualisation. It is primarily an interface to the Lattice graphics system (from the lattice package), but also produces displays from the vcd package for categorical data.
Given a multivariate dataset (either a data frame
or a
table
), Latticist attempts to produce useful displays based on
the properties of the data. The user chooses variables or expressions
for the plot axes, for grouping, conditioning and subsetting. Some
hypervariate displays are also available.
A minimal graphical user interface is available, built on the gWidgets package. This requires one of the "toolkit implementations" to installed: gWidgetstcltk, gWidgetsRGtk2 or gWidgetsrJava. Note that gWidgetsrJava is currently broken (as of version 0.0-13).
The fastest way to start, without any external system requirements, is
to install.packages("gWidgetstcltk")
. However, that does not
support an embedded graphics device, so the plots will appear in a
separate window.
Alternatively, Latticist can be run as a toolbar extension to
playwith
.
This brings many extra features, such as dynamic zooming, identifying
data points, linked brushing, etc. Note that the playwith
package requires RGtk2 and, therefore, the GTK+ libraries.
To enable all types of graphic displays, install the hexbin and deldir packages.
The playwith method invisibly returns the playState
object representing the plot window. One can close it with
playDevOff()
or dev.off()
.
The gWidgets method invisibly returns the gwindow
object. One can close it with dispose()
.
Felix Andrews felix@nfrac.org
For an excellent introduction to and coverage of Lattice:
Sarkar, Deepayan (2008) “Lattice: Multivariate Data Visualization with R”, Springer. ISBN: 978-0-387-75968-5 http://lmdvr.r-forge.r-project.org/
The mosaic displays and extensions from vcd are well described in:
David Meyer, Achim Zeileis, and Kurt Hornik (2006). “The Strucplot Framework: Visualizing Multi-Way Contingency Tables with vcd”. Journal of Statistical Software, 17(3), 1-48. http://www.jstatsoft.org/v17/i03/
latticistCompose
,
latticist.options
,
Lattice,
lattice.demo
in the TeachingDemos package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | if (interactive()) {
options(device.ask.default = FALSE)
## Not run:
## data frame example:
latticist(iris)
## table example:
latticist(Titanic, spec = list(groups = "Survived"))
## End(Not run)
## The GUI comes in three flavours:
if (require("gWidgetstcltk") &&
isTRUE(gconfirm("Show tcl/tk-based GUI?")))
{
options(guiToolkit = "tcltk")
latticist(CO2, use.playwith = FALSE)
}
if (require("gWidgetsRGtk2") &&
isTRUE(gconfirm("Show RGtk2-based GUI?")))
{
options(guiToolkit = "RGtk2")
latticist(CO2, use.playwith = FALSE)
}
if (require("playwith") &&
isTRUE(gconfirm("Show playwith-based GUI?")))
{
latticist(CO2, use.playwith = TRUE)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.