title: R :Plot and save in a pdf file
body: <p>Write R code to draw sample of size 100 from N(0,1) and N(5,1) each . Plot the two figures on the same graph.Save the graph as <code>Sample.pdf</code> in the working directory <code>I</code>.</p>
  
  <p>My attempt :</p>
  
  <pre><code> pdf("SampleGraph.pdf",width=7,height=5)
   x=rnorm(100)
   y=rnorm(100,5,1)
   plot(x,lty=2,lwd=2,col="red")
   lines(y,lty=3,col="green")
   dev.off()
  </code></pre>
  
  <p>It's not working.</p>