[R] simply this loop?

2007-04-20 Thread Weiwei Shi
Hi, anyone interested in this: I tried to simply this loop with lapply or something but haven't figured it out: mapt = c(203929_s_at, 203930_s_at, 203928_x_at, 206401_s_at) mapt.combn - lapply(1:4, function(i) combn(mapt, i)) out = list() k = 1 for (i in 1:length(mapt.combn)){ for (j in

Re: [R] simply this loop?

2007-04-20 Thread jim holtman
try this: lapply(1:4, function(j) {n=ncol(y0[[j]]); do.call('cbind',lapply(1:n, function(i) y0[[j]][,i]))}) On 4/20/07, Weiwei Shi [EMAIL PROTECTED] wrote: Hi, anyone interested in this: I tried to simply this loop with lapply or something but haven't figured it out: mapt =