[R] Bland Altman summary stats for all column combinations

2013-07-18 Thread moadeep
Hello, I have the following data.frame structure(list(Study = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 1

Re: [R] Bland Altman summary stats for all column combinations

2013-07-18 Thread arun
HI, #dat1: data Combn1<-combn(colnames(dat1)[2:5],2) #For the first part, may be this helps: library(plyr)  res<-lapply(split(Combn1,col(Combn1)),function(x) {x1<-cbind(Var1=colnames(dat1[,x])[1],Var2=colnames(dat1[,x])[2],dat1[,x],Method=dat1[,6]);colnames(x1)[3:4]<- c("V1","V2"); ddply(x1,.(Met