########################### #Plotting Sin and Cos in R# ########################### #Plotting a few points. x=c(0,pi/6,pi/4,pi/3,pi/2) y=sin(x) cbind(x,y) plot(x,y) #Adding a few more x=c(0,pi/6,pi/4,pi/3,pi/2,pi,3*pi/2,2*pi) y=sin(x) round(cbind(x,y),3) plot(x,y) #Filling in the gaps x=c(0,pi/6,pi/4,pi/3) x=c(x,x+pi/2,x+pi,x+3*pi/2,2*pi) y=sin(x) plot(x,y) #Full plot x=seq(from=0,to=2*pi,by=0.01) y=sin(x) plot(x,y) plot(x,y,type="l")