Re: [R] a similar question

2013-03-27 Thread arun
Hi Elisa, Try this: dat1- read.csv(DQV.csv,sep=\t) res- do.call(cbind,lapply(seq_len(nrow(dat1)),function(i) do.call(rbind,lapply(split(rbind(dat1[i,],dat1[-i,]),1:nrow(rbind(dat1[i,],dat1[-i,]))),function(x) {x1- rbind(dat1[i,],x); colnames(x1)- gsub([.],,colnames(x1)); if({indx-

Re: [R] a similar question

2013-03-26 Thread arun
HI Elisa, You need to review the formulas.  Some of them (especially between 84 85 or 4 84 is not making sense, possibly typos).  I changed it according to the pattern of the formulas. source(ElisaNew.txt) #mat1 # dataset res-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i)

Re: [R] a similar question

2013-02-27 Thread arun
Dear Elisa, Try this: dat1- read.table(text=  V1    V2 1 1.939064 1.791503 2   1.670409 1.508740 3   2.641346   NA 4   2.772702   NA 5   3.401987   NA 6   2.323481 1.965391 7   2.135438 1.724173 8   2.404821   NA 9   3.273616   NA 10  2.058073   NA 11  2.711462   NA 12