SplomT {cwhmisc}R Documentation

splom with title and time stamp

Description

SplomT creates a scatterplot matrix with a: covariances (with script size proportional to size) in the upper triangle, b: histograms (with smoothing) and variable names in the diagonal, and c: scatterplot with smoothes in y and x direction in the lower triangle, stressing high correlations by nearly parallel lines. See figure in other documentation.

Usage

  SplomT(data,
        mainL = deparse(substitute(data)), xlabL = "", 
        hist = "h", adjust = 1,
        hist.col = trellis.par.get("strip.background")$col[5],
        cex.diag = 1,
        h.diag=0.4,
        colYonX = "red",
        colXonY = "blue", ...)

Arguments

hist.col

string, color of the histogram; like "(hash)ffccff"

data

Matrix or dataframe containing data, variables in columns

mainL

Label on top of scatterplot matrix or matrix of histograms

xlabL

Label for x-axis

hist

"h" = histogram, "d" = density curve, "b" = both

adjust

factor to adjust smoothing window for density curve

cex.diag

correction factor for font height of correlations and names in the diagonal

h.diag

placement of the variable name in the diagonal panel, =0 means on the lower border, = 0.5 in the middle between lower and upper border

colYonX, colXonY

colour of smoothing lines, y on x and x on y

...

Parameters passed on to upper.panel,lower.panel,diag.panel

Value

This function is called for its side effect to produce a plot.

Author(s)

Christian W. Hoffmann, christian@echoffmann.ch, with the assistance of Deepayan Sarkar Deepayan.Sarkar@r-project.org.

Examples

  nc <- 8 # number of columns 
  nr <- 250 # number of rows
  data <- as.data.frame(matrix(rnorm(nr*nc),nrow=nr,ncol=nc))
  data[,nc]   <- data[,nc-2] + 0.3*data[,nc-1] #generate higher correlations
  data[,nc-1] <- data[,nc-1] + 0.9*data[,nc]
  colnames(data)<-paste("vw",letters[1:nc],sep="")
  SplomT(data,mainL="",hist="d",cex.diag=0.6,hist.col="green")
  SplomT(data,mainL="",hist="b",adjust=0.4,cex.diag = 0.5)

[Package cwhmisc version 6.6 Index]