Try this: # test data mm <- cor(iris[,-5]) mm
# get upper triangle from matrix mm[lower.tri(mm)] # if you want it as a data frame with columns for row and column names as.data.frame.table(mm)[lower.tri(mm),] In either of the cases above you could substitute row(mm) > col(mm) for lower.tri(mm) if you like. On 10/31/05, Srinivas Iyyer <[EMAIL PROTECTED]> wrote: > Dear Group, > I am a novice R programmer with little statistical > background. I am a molecular biologist by training. > I generated a correlation matrix (157 X 157) for 157 > variables. > > I want to selection only the unique values (values > that are either side of the diagnol). I want these > unique correltaion values in a list. > > How can I do this. could any one help me please. > > thank you. > > sr > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
