[R] Convert rbind of lists to data.frame

2013-07-31 Thread Shaun Jackman
I'm trying to build a data.frame row-by-row like so: df - data.frame(rbind(list('a',1), list('b', 2), list('c', 3))) I was surprised to see that the columns of the resulting data.frame are stored in lists rather than vectors. str(df) 'data.frame': 3 obs. of 2 variables: $ X1:List of 3 ..$ :

Re: [R] Convert rbind of lists to data.frame

2013-07-31 Thread arun
- From: Shaun Jackman sjack...@gmail.com To: R help r-help@r-project.org Cc: Sent: Wednesday, July 31, 2013 5:58 PM Subject: [R] Convert rbind of lists to data.frame I'm trying to build a data.frame row-by-row like so: df - data.frame(rbind(list('a',1), list('b', 2), list('c', 3))) I