title: Scaled/weighted density plot
body: <p>I want to generate a density plot of observed temperatures that is scaled by the number of events observed for each temperature data point. My data contains two columns: Temperature and Number [of observations].</p>
  
  <p>Right now, I have a density plot that only incorporates the Temperature frequency according to:</p>
  
  <pre><code>plot(density(Temperature, na.rm=T), type="l", bty="n")
  </code></pre>
  
  <p>How do I scale this density to account for the Number of observations at each temperature? For example, I want to be able to see the temperature density plot scaled to show if there are greater/fewer observations for each temperature at higher/lower temperatures.  </p>
  
  <p>I think I'm looking for something that could weight the temperatures?</p>