Description Usage Arguments Details Value See Also Examples
Simple (clustered) heatmap of tables from mvtb
(relative influence, covariance explained)
1 2 |
x |
Any table. For example: the covariance explained from |
clust.method |
clustering method for rows and columns. This should be (an unambiguous abbreviation of) one of |
dist.method |
method for computing the distance between two lower triangular covariance matrices. This must be one of |
dec |
Number of decimal places to round to if |
numformat |
function to format the covex values into strings. Defaults to removing leading 0 and rounding to |
col |
A list of colors mapping onto covex explained values. A white to black gradient is default. |
cexRow, |
See |
cexCol, |
See |
... |
extra arguments are passed to image, then to plot. See |
The row and column names of x
are used for the labels. See the examples for modifying the default colors.
heatmap of x
, usually a covariance explained matrix or a matrix of (relative) influences.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(wellbeing)
Y <- wellbeing[,21:26]
X <- wellbeing[,1:20]
Ys <- scale(Y)
cont.id <- unlist(lapply(X,is.numeric))
Xs <- scale(X[,cont.id])
res <- mvtb(Y=Ys,X=Xs)
covex <- mvtb.covex(res, Y=Ys, X=Xs)
par(mar=c(4,7,1,1))
mvtb.heat(covex,cexRow=.8)
greys <- c("#FFFFFF", "#F0F0F0", "#D9D9D9", "#BDBDBD", "#969696", "#737373",
"#525252", "#252525", "#000000")
col <- colorRampPaletteAlpha(greys, 100)
mvtb.heat(covex, Y=Ys, X=Xs, col=col, cexRow=.8)
par(mar=c(5,5,1,1))
mvtb.heat(t(mvtb.ri(res)),cexRow=.8,cexCol=1,dec=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.