trelliscope (version 0.9.7)

splod: Create a Scatterplot Display

Description

Create a scatterplot display (splod)

Usage

splod(data, id.vars = NULL, name = NULL, desc = NULL, cogFn = splodCogFn, panelFn = splodPanelFn, verbose = TRUE, ...)

Arguments

data
a data.frame or an object of class "splodDat"
id.vars
variables to ignore when computing all pairs of variables
name, desc, cogFn, panelFn, verbose, ...
parameters passed to makeDisplay

Value

an object of class 'localDiv' that can be passed to splod

References

Wilkinson, L., Anushka A., and Grossman, R. L. "Graph-Theoretic Scagnostics." INFOVIS. Vol. 5. 2005.

See Also

makeDisplay, makeSplodData, splodPanelFn

Examples

Run this code
## Not run: 
# library(lattice)
# 
# vdbConn(tempfile(), autoYes = TRUE)
# 
# # make "splod" directly from a data frame
# splod(batting, name = "batting",
#   id.vars = c("playerID", "yearID", "stint", "teamID", "lgID"))
# 
# # first transform the data into a "splodDat" object
# batSplodDat <- makeSplodData(batting,
#   id.vars = c("playerID", "yearID", "stint", "teamID", "lgID"))
# # now make "splod"
# splod(batSplodDat, name = "batting2", data = batSplodDat)
# 
# # custom panel function (color by league)
# mySplodFn <- function(d) {
#   xyplot(jitter(y) ~ jitter(x), groups = lgID, data = d,
#     xlab = getSplitVar(d, "xVar"),
#     ylab = getSplitVar(d, "yVar"),
#     auto.key = TRUE
#   )
# }
# 
# splod(batSplodDat, name = "batting3",
#   data = batSplodDat, panelFn = mySplodFn)
# 
# view()
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace