set.seed(2211) x <- rnorm(100) #get your working directory getwd()
#save it as pdf pdf("hist.pdf") hist(x) dev.off() On Tue, Jan 29, 2013 at 10:22 PM, hp wan <huaping....@gmail.com> wrote: > Can you implement it using my provided example? I read the user guide > about dev.copy2pdf > but I still failed. > > Thanks > > 2013/1/30 ilai <ke...@math.montana.edu> > > > ?dev.copy2pdf > > > > On Tue, Jan 29, 2013 at 1:48 PM, hp wan <huaping....@gmail.com> wrote: > > > >> Dear R mailing listers, > >> > >> > >> After plotting, I wanna save it as file in pdf format using > >> pdf("name.pdf") > >> command. It failed, but I can do it by GUI operation (file-save as-pdf). > >> > >> e.g. > >> > >> x11() > >> hist(x, breaks = 50, probability = FALSE) > >> pdf("hist.pdf") > >> > >> [[alternative HTML version deleted]] > >> > >> ______________________________________________ > >> R-help@r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide > >> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > >> and provide commented, minimal, self-contained, reproducible code. > >> > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.