title: Shaded area under two curves using R
body: <p>I wrote the following code in R </p>
  
  <pre><code>x=seq(-7,10,length=200)
  y1=dnorm(x,mean=0,sd=1)
  plot(x,y1,type="l",lwd=2,col="red")
  y2=dnorm(x,mean=3,sd=2)
  lines(x,y2,type="l",lwd=2,col="blue")
  </code></pre>
  
  <p>How can I shade the area under both curves (known as the overlap between the two curves).</p>
  
  <p>I will highly appreciate any suggestions.</p>