Skip to content

Two Questions

5 messages · Stephen P. Molnar, Duncan Murdoch, David Winsemius +2 more

#
On 20/04/2011 9:23 AM, Stephen P Molnar wrote:
Any book that teaches you the basics of programming would be good, it 
doesn't need to be about R.  If you want to use R and remain as a 
nonprogrammer, you will not have any easy time.
dev.new()  will open a new plot window, and subsequent plotting commands 
will be drawn there.  dev.set() lets you switch back to drawing on the 
original one.

Duncan Murdoch
#
On Apr 20, 2011, at 9:23 AM, Stephen P Molnar wrote:

            
You can have more than one device available, but you need to address  
them serially. Only one device can receive input at a time.

?Devices
?dev.set
More likely you are seeing one graph displayed at a time on the screen  
device. On my screen device the cmd-left-arrow will bring up prior  
plots to a depth of 15 earlier results.
#
Have a look at the books listed on the R website.

Books by Peter Dalgaard, Phil Spector, Michael Crawley & John Verzani are all possibilities.  Also haved a look at the Contributed Documentation page on the site.  It has some very useful material.
#
When running a large number of commands from a script that produces multiple plots it is often best to send the plots to the pdf device (or other system) that you can then page through after it is finished.  You could also specify par(ask=TRUE) then you would be prompted before changing the plot (but other code would not execute either).