data(attitude)
keys <- matrix(c(1,1,1,0,0,0,0,
0,0,0,1,1,1,1),ncol=2)
colnames(keys) <- c("first","second")
r.mat <- cor(attitude)
cluster.cor(keys,r.mat)
#$cor
# first second
#first 1.0 0.6
#second 0.6 1.0
#
#$sd
# first second
# 2.57 3.01
#
#$corrected
# first second
#first 0.82 0.77
#second 0.60 0.74
#
#$size
# first second
# 3 4
Run the code above in your browser using DataLab