Description Usage Arguments Value Author(s) Examples
The upper diagonale of the correlation matrix is visualized by colored ellipses, with the color, shape and direction of the ellipsis showing the dependence of the respective variable pair. the lower diagonale of the matrix-like plot contains the corresponding correlation values.
1 2 3 4 5 6 | general.corplot(data, cor.type = c("pearson", "spearman", "kendall"),
col = c("tomato1", "green3"), plot.type = c("ellipse", "points"),
size.cor = 1, add.hist = FALSE, disp.sig.lev = 1, disp.thresh = 0.1,
conf.level = NULL, n.boot = 1000, pt.size = 0.4, group.cut = NULL,
border = NA, png.out = FALSE, png.width = 5, png.height = 5,
file.name = NULL, ...)
|
data |
data set in wide format (Required) |
cor.type |
type of correlation coefficient, 'pearson', 'spearman' or 'kendall' (Default: 'spearman') |
col |
vector of length two with the colors for negative and positive correlations (Default: c('tomato1','green3')) |
plot.type |
plot type in the upper diagonale, 'ellipse' or 'points', i.e. scatterplots (Default='ellipse') |
size.cor |
text size of the correlation numbers (Default: 1) |
add.hist |
add histograms on the left hand side of the plot (Defaul=FALSE) |
disp.sig.lev |
ellipses of correlations with a p-value above this threshold will not be displayed and the corresponding correlation number will be displayed in grey (Default: 1) |
disp.thresh |
ellipses of correlations with an absolute value below this threshold will not be displayed |
conf.level |
level for the confidence intervals (Does not work for 'kendall') (Default: Null) |
n.boot |
number of bootstrap iterations, if confidence intervals for 'cor.type='spearman” are calculated (Default: 1000) |
pt.size |
size of the points, if plot.type='points' (Default: 0.4) |
group.cut |
number of the last variable in the first group if variables can be split up into two groups, |
border |
color of the border around the ellipses (Default: NA) |
png.out |
output as PNG? (Default: FALSE) |
png.width |
width of PNG in inches (Default: 5) |
png.height |
height of PNG in inches (Default: 5) |
file.name |
filename of the PNG without '.png' |
... |
Additional parameters for par() |
The correlation plot
Sebastian Voss, Adam Skubala
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data(mtcars)
general.corplot(data=mtcars, cor.type='pearson', disp.sig.lev=0.05, group.cut=3)
general.corplot(data=mtcars, cor.type='pearson', disp.sig.lev=0.05, cex=0.95)
general.corplot(data=mtcars, cor.type='pearson', disp.sig.lev=0.05, group.cut=4,
conf.level=0.95, cex=0.95)
general.corplot(data=mtcars, cor.type='pearson', disp.sig.lev=0.05, group.cut=4,
plot.type='points', conf.level=0.95, cex=0.95)
general.corplot(data=mtcars, cor.type='pearson', disp.thresh=0.5, group.cut=4,
plot.type='points', conf.level=0.95, cex=0.95, add.hist=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.