I have a thousand-row table of the type below and need to calculate the sum and mean of a continuous "count" variable for every categorical "df" varible.
I have attempted to solve this through table() function, but since I am a using continuous variable, I can't work myself towards a solution. 
   df count
1   a     5
2   f     3
3   g     8
4   l     2
5   a    10
6   s     4
7   l     6
8   s     8
9   a     2
10  g     1
 
     
     
     
    