Write an R code to draw a sample of size 100 from N (0,1) and N (5,1) each. Highlight two numbers on one chart. Save the graph as Sample.pdf in the working directory I
My attempt:
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()
Does not work.
r
user2983722
source share