Description Usage Arguments Details Value Author(s) References See Also Examples
~~ A concise (1-5 lines) description of what the function does. ~~
1 | panel.pairs.cm(z, cex = 1, main = "", tol = 0.05)
|
z |
~~Describe |
cex |
~~Describe |
main |
~~Describe |
tol |
~~Describe |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (z, cex = 1, main = "", tol = 0.05)
{
grid.newpage()
pushViewport(
viewport(name = "base",
x = .025, y = .025,
w = .95, h = .95,
just = c("left", "bottom")) )
n.var <- ncol(z)
if (n.var == 0)
return()
lim <- vector("list", length = n.var)
prepanel.limits <-
function (x)
{
range(x,finite = TRUE) + 0.07*diff(range(x, finite = TRUE))*c(-1,1)
}
for (i in seq_len(n.var)) lim [[i]] <- prepanel.limits(z[, i])
splom.layout <- grid.layout(nrow = n.var, ncol = n.var)
pushViewport(
viewport( layout = splom.layout, name = "pairs" )
)
for (i in 1:n.var)
{
for (j in 1:n.var)
{
pushViewport(
viewport(
layout.pos.row = n.var - i + 1,
layout.pos.col = j,
name = paste("subpanel", j, i, sep = "."),
clip = TRUE,
xscale = if (is.character( lim [[j]] ))
c(0, length( lim [[j]] ) + 1)
else lim [[j]],
yscale = if (is.character( lim [[i]] ))
c(0, length( lim [[i]] ) + 1)
else lim [[i]]
)
)
if (i == j)
{
diag.panel.cm(varname = colnames(z)[i], cex=cex)
} else
{
if (i > j)
{
main.panel.cm(x = z[, j], y = z[,i], tol = tol, cex = cex)
grid.rect(gp = gpar(lwd = cex, col=grey(0.5), fill="transparent"))
}
}
upViewport()
}
}
upViewport()
grid.text(main, x=0.5, y=0.1, default.units="npc", gp = gpar(cex = cex*1.2))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.