ggcorplot {Deducer} | R Documentation |
Correlation matrix
Description
Plots a correlation matrix
Usage
ggcorplot(cor.mat,data=NULL,lines=TRUE,line.method=c("lm","loess"),type="points",
alpha=.25,main="auto",var_text_size=5,
cor_text_limits=c(5,25),level=.05)
Arguments
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. |
Author(s)
Mike Lawrence and Ian Fellows
See Also
Examples
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)
[Package Deducer version 0.7-9 Index]