title: Histogram with weights in R
body: <p>I need to plot a weighted histogram of density rather than frequency. I know that <code>freq = FALSE</code> is available in <code>hist()</code> but you can't specify weights. In <code>ggplot2</code> I can do this:</p>
  
  <pre><code>library(ggplot2)
  w &lt;- seq(1,1000)
  w &lt;-w/sum(w)
  v &lt;- sort(runif(1000))
  
  foo &lt;- data.frame(v, w)
  
  ggplot(foo, aes(v, weight = w)) + geom_histogram()
  </code></pre>
  
  <p>But where is the equivalent of <code>freq = FALSE</code>?</p>