Re: [R] how to convert list into a vector

2009-10-08 Thread delnatan
Ok, nevermind. all I had to do was unlist(myList). delnatan wrote: > > Hi , > > I want to convert a my list: > >> myList > [[1]] > [1] 1 2 3 4 5 > [[2]] > [1] 6 7 8 > [[3]] > [1] 9 10 11 > > into something like c(1,2,3,4,5,6,7,8,9,10,11) > > I realized that this is possible by > >> c(d

Re: [R] how to convert list into a vector

2009-10-08 Thread Henrique Dallazuanna
If you want do.call, you can use c indeed of cbind: do.call(c, list(1:5, 6:8, 9:11)) On Thu, Oct 8, 2009 at 12:13 PM, delnatan wrote: > > Hi , > > I want to convert a my list: > >> myList > [[1]] > [1] 1 2 3 4 5 > [[2]] > [1] 6 7 8 > [[3]] > [1] 9 10 11 > > into something like c(1,2,3,4,5,6,7,8,

Re: [R] how to convert list into a vector

2009-10-08 Thread David Winsemius
On Oct 8, 2009, at 11:13 AM, delnatan wrote: Hi , I want to convert a my list: myList [[1]] [1] 1 2 3 4 5 [[2]] [1] 6 7 8 [[3]] [1] 9 10 11 into something like c(1,2,3,4,5,6,7,8,9,10,11) ?unlist I realized that this is possible by c(do.call("cbind",myList)) But only when list[[1]

[R] how to convert list into a vector

2009-10-08 Thread delnatan
Hi , I want to convert a my list: > myList [[1]] [1] 1 2 3 4 5 [[2]] [1] 6 7 8 [[3]] [1] 9 10 11 into something like c(1,2,3,4,5,6,7,8,9,10,11) I realized that this is possible by > c(do.call("cbind",myList)) But only when list[[1]] through list[[3] have equal length of vectors within them