Usage
corrplot(corr, method = c("circle", "square", "ellipse", "number",
"pie", "shade", "color"),
type = c("full", "lower", "upper"),
order = c("original", "alphabet", "PCA", "hclust"),
hclust.method = c("complete", "ward", "single", "average",
"mcquitty", "median", "centroid"),
col = colorRampPalette(c("#67001F", "#B2182B", "#D6604D", "#F4A582",
"#FDDBC7", "#F7F7F7", "#D1E5F0", "#92C5DE",
"#4393C3", "#2166AC", "#053061"))(200),
outline = FALSE, cex = 1, title = "", bg = "white",
addcolorkey = TRUE, colorkey=c("-1to1","min2max"),
cex.col.num = 0.8, mar = c(0,0,2,0),
addtextlabel = TRUE, pos.text = c("sides","diag"), col.text = "red",
shade.method = c("negtive", "positive", "all"),
lwd.shade = 1, col.shade = "white",
addgrid = TRUE, col.grid = "gray", diag = TRUE,
addnum = FALSE, col.num = NULL,
corr.mtest = FALSE, p.mat = NULL, conf.level = 0.95,
non_corr.method = c("pch","blank"),
pch = 4, col.pch = "red", cex.pch = 1,
plotConf = FALSE, low.mat = NULL, upp.mat = NULL)
corrplot.circle(corr, ...)
corrplot.ellipse(corr,...)
corrplot.number(corr, ...)
corrplot.pie(corr, ...)
corrplot.shade(corr, ...)
corrplot.square(corr, ...)
corrplot.shade(corr, ...)
corrplot.mtest(dat = NULL, corr = NULL, p.mat = NULL, conf.level = 0.95,
plotConf = FALSE, low.mat = NULL, upp.mat = NULL,
non_corr.method = c("pch","blank"), method = c("circle","square"),
pch = 4, col.pch = "black",...)Arguments
corr
the correlation matrix, must be square if order is not "original" (default).
method
the visualization method of correlation matrix to be used. Currently, it support seven methods, named "circle", "square", "ellipse", "number", "pie", "shade" and "color"
type
plot "full" matrix or just "upper" or "lower" triangular part of it.
order
the ordering method of the correlation matrix, need square matrix.
"original"for orginal order."alphabet"for alphabetical order."PCA"for principal component analysis."hclust
hclust.method
the agglomeration method to be used when order is hclust. This should be one of "ward", "single", "complete", "average", "mcquitty" col
vector(any length), the color of glyphs.
outline
logical, whether plot outline of circles, square and ellipse or not.
cex
numeric, for the text label (variable names).
addcolorkey
whether add colorkey or not.
colorkey
style of colorkey, must be "-1to1" or "min2max".
cex.col.num
cex of the number in colorkey.
addtextlabel
logical, whether add text label or not.
pos.text
position of text labels, if "sides", all the text labels will be plot on sides; if "diag" (only valid when type is upper or lower), a set of text labels will be plot near the principal diago
col.text
the color of text label.
shade.method
shade method, only valid when method is shade. If negative, then the negtive correlation will be shaded; if positive, then the positive correlation will be shaded; If all, then all correlati
lwd.shade
the line width of shade.
col.shade
the color of shade line.
addgrid
logical, whether add grid or not.
col.grid
the color of grid.
diag
logical, whether display the correlation of the principal diagonal.
addnum
logical, whether to plot numerical correlations on glyphs. Note: the figures are expressed in terms of a percentage for spacesaving.
col.num
col of numerical correlations.
corr.mtest
logical, whether to visualize the result of test for correlation. Note: need input parameters dat (only supported by function corrplot.mtest) or p.mat if TRUE.
p.mat
matrix of p-value, function corrplot.mtest can also calculate it from input parameter dat.
conf.level
confidence level for the returned confidence interval (valid in function corrplot.mtest()) and calculating the level of significance.
non_corr.method
the method to deal with the correlation whose p-value is less than level of significance (1-conf.level), if "blank", wipe away the corresponding glyphs; if "pch", add character on the corresponding glyphs.
pch
plotting character for the correlation whose p-value is less than level of significance (only valid when non_corr.method is pch).
col.pch
the color of pch (only valid when non_corr.method is pch).
cex.pch
the cex of pch (only valid when non_corr.method is pch).
plotConf
logical, whether to plot confidence interval or not. Note: need input parameters dat (only supported by function corrplot.mtest) or low.mat and upp.mat if TRUE.
low.mat
matrix of the lower bound of confidence interval, function corrplot.mtest can also calculate it from input parameter dat automatically.
upp.mat
matrix of the upper bound of confidence interval, function corrplot.mtest can also calculate it from input parameter dat automatically.
dat
original data.frame or matrix for function corrplot.mtest, corrplot.mtest can calculate correlation , p-value and confidence interval automatically from dat.