Created
November 30, 2016 16:20
-
-
Save CnrLwlss/304871d8006e3a23c69a672f71f28983 to your computer and use it in GitHub Desktop.
Get best size for graphics array (array dimension that is most perfectly filled by correlation plots) when plotting possible pairwise combinations of variables against each other.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fdefpairs=t(combn(fdefs,2)) | |
npairs=dim(fdefpairs)[1] | |
a=round(sqrt(npairs)) | |
if((a+1)*(a+1)>=npairs) mfrow=c(a+1,a+1) | |
if((a+1)*a>=npairs) mfrow=c(a,a+1) | |
if(a*a>=npairs) mfrow=c(a,a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment