Description Usage Arguments Value Author(s) Examples
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.
1 2 3 4 5 6 7 8 |
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 |
This function is called for its side effect to produce a plot.
Christian W. Hoffmann, christian@echoffmann.ch, with the assistance of Deepayan Sarkar Deepayan.Sarkar@r-project.org.
1 2 3 4 5 6 7 8 | 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)
|
Loading required package: lattice
Loading required package: grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.