i have 2 Tables with 2 columns each:
ID     Topic  
123     A  
124     B  
125     A  
126     C    
and:
ID     Freq  
123     20  
124     30   
125     10  
123     50  
the Result should be each topic with related sum of freq, like this:
Topic   Total  
  A      80  
  B      30  
  C       0  
how do i get this with R (working with RStudio) also the tables are really long ~ 50k lines
 
     
     
    