I'm getting data from a MySQL table that has 2 columns (idDoc, tag) describing that the document has a given tag. When I use the data frame with
ddply(tags,1)
My objective is to group tags by id, so say I do the following steps
> x=c(1,1,2,2)
> y=c(4,5,6,7)
> data.frame(x,y)
x y
1 1 4
2 1 5
3 2 6
4 2 7
My desired output would be perhaps a list of lists (or whatever other result) that would get
1 -> c(4,5)
2 -> c(6,7)
Regards