latticist {playwith} | R Documentation |
Interactively explore a data set using Lattice displays.
latticist(dat, reorder.levels = TRUE, plot.call = quote(marginal.plot(dat, reorder = FALSE)), ..., labels = rownames(dat), time.mode = FALSE)
dat |
a data frame (with numeric and/or categorical variables),
or an object that can be coerced with as.data.frame
(such as a table ). |
reorder.levels |
if TRUE , change the ordering of levels of factor
variables so they are in order of frequency. Note that this does not
change the data, only its internal representation: see
reorder . This is recommended for effective graphic
displays. Factor variables of class ordered are not reordered.
Therefore you should ensure that any variables whose levels have an inherent
order are of class ordered : see as.ordered .
Note: the result of cut is by default NOT
ordered !
Numeric variables with discrete values in {0, 1, -1} are converted to factors.
|
plot.call |
call defining the initial plot display.
This can be given instead of dat , and the dataset will be
derived from it (see examples). |
..., labels, time.mode |
further arguments passed to playwith .
|
Latticist is an extension to playwith
, adding a
toolbar to construct lattice displays for a given dataset.
As such, many of the features, such as style settings and linked
brushing, are (or should be) described in the help for
playwith
.
It is recommended to install the deldir package, as well as hexbin, a BioConductor package, which can be installed as follows:
source("http://bioconductor.org/biocLite.R")
biocLite("hexbin")
invisibly returns the playState
object representing the plot
window: see playwith.API.
Felix Andrews felix@nfrac.org
For an excellent introduction to and coverage of Lattice:
Sarkar, Deepayan (2008) "Lattice: Multivariate Data Visualization with R", Springer. http://lmdvr.r-forge.r-project.org/
playwith
,
Lattice,
lattice.demo
in the TeachingDemos package.
if (interactive()) { options(device.ask.default = FALSE) ## CO2 dataset: see ?CO2 ## From an experiment on the cold tolerance of a grass species. ## Try: uptake ~ conc ## uptake ~ conc | Plant ## uptake ~ conc | Type, groups = Treatment latticist(CO2) ## environmental dataset: see ?environmental ## Daily measurements related to ozone pollution in NYC 1973. ## Specify initial display: readline("Hit Enter for 'environmental' example...") latticist(plot = quote(parallel(environmental, col = 1))) ## National Health and Nutrition Examination Survey. ## Try: ~ Smoke, groups = Sex ## Sex ~ Smoke ## Smoke ~ Age | Sex ## ~ Diet.Iron, groups = Sex ## Hemoglobin ~ Diet.Iron | Sex ## (with both x and y "discretized") if (require(hexbin)) { readline("Hit Enter for 'NHANES' example...") data(NHANES) latticist(NHANES) } ## audit dataset: artificial data representing tax work. if (require(rattle)) { readline("Hit Enter for 'audit' example...") audit <- read.csv(system.file("csv", "audit.csv", package = "rattle")) latticist(audit, new = TRUE) } }