Hi, I wrote a simple master function, run(), that has inside six qplot functions. The goal is to type run() and have all six graphs appear as separate windows so that I can copy them into PowerPoint for a client. When I type run(), only the last graph appears, the first five apparently being overwritten. How do I get all six in separate windows, ready for copying? By the way, is the a way to create a PowerPoint deck directly in R the way you can in S-Plus? Thanks, Walt -- ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 ________________________ (V) 609-936-8999 (F) 609-936-3733 dataanalytics at earthlink.net www.dataanalyticscorp.com
Try dev.new() after each graph is generated. Example code from my setup (adapted a bit to fit your situation): Alternate Method 1: Generate images and insert into PPT png(file = "chart1.png", width=800, height=800) #do something pretty dev.off() Alternate Method 2: Generate images with new windows dev.new() #do something pretty Check out the library R2PPT to answer your question about interaction with PPT. Also, don't know if you're using the new Offce 2007, the default fonts with Calibri, etc. will be different (R generates them in the default font Arial). You can set it so that you match Office2K7 (or any other font of your choice) for consistency with the graphs generated in R and the rest of your presentation by doing the following: windowsFonts(calibri = windowsFont("Calibri")) windowsFonts(consolas = windowsFont("Consolas")) dev.new() par(family="calibri") #Office 2K7 default font #do something pretty HTH, Cedrick Data Analytics Corp. wrote:> Hi, > > I wrote a simple master function, run(), that has inside six qplot > functions. The goal is to type run() and have all six graphs appear > as separate windows so that I can copy them into PowerPoint for a > client. When I type run(), only the last graph appears, the first five > apparently being overwritten. How do I get all six in separate > windows, ready for copying? > > By the way, is the a way to create a PowerPoint deck directly in R the > way you can in S-Plus? > > Thanks, > > Walt > > >
Data Analytics Corp. wrote:> > Hi, > > I wrote a simple master function, run(), that has inside six qplot > functions. The goal is to type run() and have all six graphs appear as > separate windows so that I can copy them into PowerPoint for a client. > When I type run(), only the last graph appears, the first five > apparently being overwritten. How do I get all six in separate windows, > ready for copying? > > By the way, is the a way to create a PowerPoint deck directly in R the > way you can in S-Plus? > > Thanks, > > Walt > > > > -- > ________________________ > > Walter R. Paczkowski, Ph.D. > Data Analytics Corp. > 44 Hamilton Lane > Plainsboro, NJ 08536 > ________________________ > (V) 609-936-8999 > (F) 609-936-3733 > dataanalytics at earthlink.net > www.dataanalyticscorp.com > > ______________________________________________ > R-help at 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. > >There is an example in our "A Beginner's Guide to R" that exports the graphs automatically to jpg files (from a loop inside a function)...which you could then import into powerpoint. But as you can see from the other post, it can even be done automatically. Alain ----- -------------------------------------------------------------------- Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p. 2. Mixed effects models and extensions in ecology with R. (2009). Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. 3. A Beginner's Guide to R (2009). Zuur, AF, Ieno, EN, Meesters, EHWG. Springer Statistical consultancy, courses, data analysis and software Highland Statistics Ltd. 6 Laverock road UK - AB41 6FN Newburgh Email: highstat at highstat.com URL: www.highstat.com -- View this message in context: http://www.nabble.com/Multiple-graphs-tp24690227p24697026.html Sent from the R help mailing list archive at Nabble.com.