I have an excel input file containing information about blood samples. Each subject gave three blood samples; each sample has a numeric ID. These sample IDs are currently encoded in a column as follows:
Surname Name Idsample
Jash Milena 05311511
Jash Milena 05311512
Jash Milena 05311514
Sailor Zac 06011509
Sailor Zac 06011510
Sailor Zac 06011511
What I want to do is arrange the data such that each subject is associated with a corresponding list of comma-separated sample ids in one row:
Surname Name Idsample
Jash Milena 05311511,05311512,05311514
Sailor Zac 06011509,06011510,06011511
but i am having trouble with that. I can use only R. Thanks