I have two columns in data frame. I want to count the total number of each V (e.g. IGHV4-39) in R. Here I am adding an example of my dataset.
v count
IGHV4-39 1541
IGHV3-66 1094
IGHV3-7 1038
IGHV4-39 794
IGHV3-23 748
IGHV3-66 727
IGHV3-7 608
I want to get the result as following-
IGHV4-39 2335
IGHV3-66 1821
IGHV3-7 1646
IGHV3-23 748
[eExample: For IGHV4-39> 1541+794 =2335]
How can I count such way in R? It would be great if someone writes the solution.
Thanks and Cheers Sumanta