Re: [R] Reading name-value data

2011-08-01 Thread Hadley Wickham
Yes! Would you mind filing an issue so I dont forget? Hadley On Friday, July 29, 2011, Stavros Macrakis macra...@alum.mit.edu wrote: Perfect! Thanks! By the way, I see that, unlike base rbind, it does not work for vectors and lists: rbind(c(a=1),c(b=2)) =

Re: [R] Reading name-value data

2011-07-29 Thread Stavros Macrakis
Perfect! Thanks! By the way, I see that, unlike base rbind, it does not work for vectors and lists: rbind(c(a=1),c(b=2)) = matrix(1:2,2,1,dimnames=list(NULL,a)) == as.matrix(data.frame(a=1:2)) but rbind.fill(c(a=1),c(b=2)) = NULL Shouldn't it give something like

[R] Reading name-value data

2011-07-28 Thread Stavros Macrakis
I have a file of data where each line is a series of name-value pairs, but where the names are not necessarily the same from line to line, e.g. a=1,b=2,d=5 b=4,c=3,e=3 a=5,d=1 I would like to create a data frame which lines up the data in the corresponding columns. In this case, this

Re: [R] Reading name-value data

2011-07-28 Thread Hadley Wickham
Use plyr::rbind.fill? That does match up columns by name. Hadley On Thu, Jul 28, 2011 at 5:23 PM, Stavros Macrakis macra...@alum.mit.edu wrote: I have a file of data where each line is a series of name-value pairs, but where the names are not necessarily the same from line to line, e.g.