\begin{Schunk}
\begin{Sinput}
 pdf(file = "myimage.pdf")
 ##or postscript(file = "myimage.eps")
 ##"put your plot commands here")
 dev.off()   #vital to save your file!
\end{Sinput}
\end{Schunk}
