ggcorrplot
ggcorrplot copied to clipboard
support for non-square correlation matrix
Is it possible for ggcorrplot
to support non-square correlation matrix? Such case is frequently in data analysis, for example when we only want to visualize correlation of a group of columns with another group of columns:
data(mtcars)
df1 <- mtcars[1:3]
df2 <- mtcars[4:7]
corr <- cor(df1, df2)
# hp drat wt qsec
# mpg -0.7761684 0.6811719 -0.8676594 0.4186840
# cyl 0.8324475 -0.6999381 0.7824958 -0.5912421
# disp 0.7909486 -0.7102139 0.8879799 -0.4336979
ggcorrplot
currently can not draw non-square correlation matrix. Also cor_pmat
only takes single argument and cannot get p.values for correlation between two data.frame
s.
Thank you for this suggestion. I'll update the package so that it can handle such cases.
Were there any advances on non-square matrix support? Did the ggcorrplot maintainers agree to work on this request?
How's it coming folx?
I still can't plot a non-square correlation matrix with ggcorrplot. Any workaround?