title: How to use the function curve in [R] to graph a normal curve?
body: <p>I'm trying to make a histogram in [R], and the normal curve that describes the histogram as follows:</p>
  
  <pre><code>w&lt;-rnorm(1000) 
  hist(w,col="red",freq=F,xlim=c(-5,5))
  curve(dnorm(w),-5,5,add=T,col="blue")
  </code></pre>
  
  <p>But when I try to plot the normal curve by curve function shows me the following error:</p>
  
  <pre><code>Error en curve(dnorm(w), -5, 5, add = T, col = "blue") : 
    'expr' must be a function, or a call or an expression containing 'x'
  </code></pre>
  
  <p>What am I doing wrong?</p>