Skip to content

Apply function to every 20 rows between pairs of columns in a matrix

1 message · arun

#
Hi,
May be this what you wanted.
res2 <- lapply(row.names(res[[1]]),function(x) do.call(rbind,lapply(res,function(y) y[match(x, row.names(y)),])))
?length(res2)
#[1] 48
?dim(res2[[1]])
#[1] 2325??? 8

A.K.
On Monday, November 11, 2013 10:20 PM, Yu-yu Ren <renyangsu at gmail.com> wrote:
Thank you so much for that script, it works great. One additional request; how can I go about binding each of the 2325 matrices for each sample, resulting in 48 matrices of 8 column by 2325 row?
On Mon, Nov 11, 2013 at 10:02 PM, arun <smartpink111 at yahoo.com> wrote: