Skip to content
Prev 274000 / 398506 Next

correlation matrix

What a pleasant post to respond to - with self-contained code. :)

heat<-matrix(0,nrow=dim(xa)[1],ncol=dim(xa)[2])

heat[lower.tri(heat)]<-xa[lower.tri(xa)]
heat[upper.tri(heat)]<-xb[upper.tri(xb)]
diag(heat)<-1

heat

HTH,
Daniel
1Rnwb wrote:
--
View this message in context: http://r.789695.n4.nabble.com/correlation-matrix-tp3891085p3891685.html
Sent from the R help mailing list archive at Nabble.com.