Plotting weighted population densities in r
===

I'm analyzing a batch of data in R which I have plotted the population density on.  I would also like to generate a value density plot.  For example:

          dog.breed    weight.lbs
    [1]   Labrador     63
    [2]   Maltese      6
    [3]   Dalmatian    55
    [4]   Poodle       51
    [5]   Maltese      4
    [6]   Dalmatian    48
    [7]   Poodle       56

The standard density plot will count the # of occurrences for each breed and then output a nice curve, as such:

          dog.breed    x
    [1]   Labrador     1
    [2]   Maltese      2
    [3]   Dalmatian    2
    [4]   Poodle       2

However what I am trying to obtain is a similarly smooth curve tracing the sum of the weights for each breed, as such:

          dog.breed    x
    [1]   Labrador     63
    [2]   Maltese      10
    [3]   Dalmatian    103
    [4]   Poodle       107

I can do this by establishing a series of points, such as in the final example, and then fitting a curve.  But that's messy.  I was hoping someone knew of clean package that could do the heavy lifting.

Thanks for the help.