Hello,
having a list like testlist I would like to transform it in dataframe. How
does it work?
Thanks
Hermann
testlist
[[1]]
BP_A SNP_A BP_B SNP_B R2
2 27001689 rs4822747 27002392 rs4820690 0.695642
3 27001689 rs4822747 27004298 rs5761627 0.695642
4 27001689 rs4822747
Hi. Here is one way:
l - list(structure(list(BP_A = c(27001689L, 27001689L, 27001689L,
27001689L, 27001689L, 27001689L), SNP_A = c(rs4822747, rs4822747,
rs4822747, rs4822747, rs4822747, rs4822747), BP_B = c(27002392L,
27004298L, 27004902L, 27004964L, 27005122L, 27005158L), SNP_B =
c(rs4820690,
Hi Hermann,
You may try:
do.call(rbind,testlist)
#or
Reduce(rbind,testlist)
#or
library(plyr)
ldply(testlist)
A.K.
On Thursday, November 14, 2013 8:27 AM, Hermann Norpois hnorp...@gmail.com
wrote:
Hello,
having a list like testlist I would like to transform it in dataframe. How
does it
do.call (rbind, testlist) and Reduce (rbind, testlist) are perfect.
Thanks
hermann
2013/11/14 arun smartpink...@yahoo.com
Hi Hermann,
You may try:
do.call(rbind,testlist)
#or
Reduce(rbind,testlist)
#or
library(plyr)
ldply(testlist)
A.K.
On Thursday, November 14, 2013 8:27 AM,
4 matches
Mail list logo