Description Usage Arguments Author(s) See Also Examples
Plots a correlation matrix
1 2 3 |
cor.mat |
a |
data |
the data.frame used to compute the correlation matrix |
lines |
Logical. Should regression lines be drawn. |
type |
type of plot. "points" or "bins" |
line.method |
Character. Type of regression line. |
alpha |
numeric. level of alpha transparency for the points. |
main |
Title of the plot. defaults to the method of cor.mat. |
var_text_size |
size of the diagonal variable names. |
cor_text_limits |
lower and upper bounds for the size of the correlation text. |
level |
the size of the test differentiated by text color. |
Mike Lawrence and Ian Fellows
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 | data(mtcars)
corr.mat1<-cor.matrix(variables=d(mpg,carb,carb+rnorm(length(carb))),,
data=mtcars,
test=cor.test,
method='spearman',
alternative="two.sided",exact=FALSE)
p<-ggcorplot(corr.mat1,data = mtcars)
print(p)
## Not run:
has.hex<-require("hexbin")
if(has.hex){
data(diamonds)
corr.mat<-cor.matrix(variables=d(price,carat,color),,
data=diamonds,
test=cor.test,
method='spearman',
alternative="two.sided")
p1 <- ggcorplot(cor.mat=corr.mat,data=diamonds,type="bins",
cor_text_limits=c(5,15),
lines=FALSE)
print(p1)
rm('corr.mat')
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.