I have a set of data:
Project<-c("1","2","3","4","5")
Product<-c("A","B","A","B","B")
data<-data.frame(Product, Project)
> data
Product Project
A 1
B 2
A 3
B 4
B 5
I want to group the data such that it becomes:
Product Project
A 1,3
B 2,4,5
May I ask how can I do this in R? I was looking up the apply function but still couldn't figure out how I can do this..... Any help would be appreciated.