0

I have a list of samples and the name of mutations happen in each sample in a second column. For a given sample, there may be more than one mutation like below

enter image description here

In R, how I can convert it into a data frame with sample label in one column and then the absolute number of mutations per sample in a second column?

Mussa
  • 117
  • 7
  • Look for question about "summarize by group", where your summary statistics is likely `length`. This can be done with `aggregate`, `tapply`, `dplyr::group_by`/`summarize`, etc. – r2evans Oct 16 '20 at 07:30
  • `df %>% count(Tumor_Sample_Barcode)` using `dplyr`. – Ronak Shah Oct 16 '20 at 07:34

0 Answers0