Re: [R] write a function to do pairwise calculation

2013-06-19 Thread arun
rror in cor(A, D) : incompatible dimensions A.K. From: Amanda Li To: arun Sent: Wednesday, June 19, 2013 1:11 AM Subject: Re: [R] write a function to do pairwise calculation Hello, Thanks for your help! I am a novice in R, and may I ask how I am suppose

Re: [R] write a function to do pairwise calculation

2013-06-17 Thread arun
Hi, You didn't provide any information about the package.  I guess it is from "energy".  library(energy) x <- iris[1:50, 1:4]   #examples given in the package y <- iris[51:100, 1:4] z<- iris[101:150,1:4] vec1<-c("x","y","z") mat1<- combn(vec1,2) sapply(split(mat1,col(mat1)),function(.dat) dc