Skip to content
Prev 309338 / 398506 Next

Named list of data.frames to data.frame with names

Hello,

There's nothing inelegant in your solution, you're using vectorized 
instructions.
But there's a bug. The argument to rep should be 'each', not 'times'.

l2$name <- rep(names(l), each=sapply(l,nrow))

Hope this helps,

Rui Barradas
Em 30-10-2012 08:16, Mark Payne escreveu: