Re: [R] Apply function to do pairwise calculation

2013-09-30 Thread arun
0342 0.5567617 0.3721136 0.4480448 A.K. - Original Message - From: Amanda Li To: r-help@r-project.org Cc: Sent: Monday, September 30, 2013 10:55 AM Subject: [R] Apply function to do pairwise calculation Hello, I want to do pairwise calculation, but I am not sure how to do so. i.e. I h

Re: [R] Apply function to do pairwise calculation

2013-09-30 Thread Adams, Jean
Amanda, If I understand what you're trying to do, this example might help you. M <- structure(c(0.66, 0.05, -0.93, -0.61, 0.65, -0.25, 0.23, -0.89, 0.37, 0.38, -0.91, 0.91, -0.05, -0.65, -0.94, 0.73, -0.88, 0.25, 0.04, -0.89, -0.47, -0.46, 0.86, -0.29, 0.92, 0.22, 0.77, -0.98, -0.56, 0.11, 0.35

[R] Apply function to do pairwise calculation

2013-09-30 Thread Amanda Li
Hello, I want to do pairwise calculation, but I am not sure how to do so. i.e. I have a correlation matrix M 200*200. Namely colnames(M)=rownames(M). In addition, colnames(M) is one of A, B, C, D. I want to first sort the matrix M into 16 modules according to colnames and rownames, and then apply