Skip to content
Prev 155643 / 398506 Next

many correlations

Stephen and Jorge,
  Perhaps a simpler solution is to use the which function

test.data <- Harman74.cor$cov    #a test data set
td <- test.data * lower.tri(test.data)   #this will examine only the 
lower off diagonal elements
td.1 <- which(abs(td)>.6,arr.ind=TRUE)   # the critical pairs
td.2 <- td[which(abs(td)>.6)]                       # the values
td.row <-  colnames(test.data)[td.1[,1]]  #get the row names
td.col <- colnames(test.data)[td.1[,2]]     #and the column names
td.df <- data.frame(td.row,td.col,correl = td.2)   #put it all together

Bill
At 12:57 PM -0400 9/3/08, Jorge Ivan Velez wrote: