# simulate simple matrix of 10 variables
mat = matrix(rnorm(1000), ncol=10)
# compute correlation matrix
C = cor(mat)
# plot correlations
plotCorrMatrix( C )
# plot squared correlations
plotCorrMatrix( C^2 )
Run the code above in your browser using DataLab