R aggregate values from several fields into one
===

I have the following data frame in R:

    objects   categories
       A       162
       B       162
       B       190
       C       123
       C       162
       C       185
       C       190
       C        82
       C       191
       D       185

As you see there are objects and the categories they belong to. I would like to sum up the categories of each object in comma separated list to get a data frame which would look like this:

     objects   categories
       A       162
       B       162, 190
       C       123, 162, 185, 190, 82, 191
       D       185

How could I do this?

Best Regards Sab
