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

2013-07-31 Thread arun
of  2 variables: # $ X1: chr  "a" "b" "c" # $ X2: num  1 2 3 A.K. - Original Message - From: Shaun Jackman To: R help 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

[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 ..$ :