Skip to content
Prev 176274 / 398503 Next

Collapse data matrix with extra info separated by commas

On Mon, Apr 6, 2009 at 10:40 AM, baptiste auguie <ba208 at exeter.ac.uk> wrote:
This is a problem that currently isn't very easy to solve in plyr (but
I'm working on it).  About the best you can do is:

ddply(test, ~ a + b, colwise(paste, .(c)), collapse =",")

(this is basically equivalent to your suggestion)

Hadley