Re: [R] close specific graphics device

2015-12-16 Thread Henrik Bengtsson
The R.devices package provides functions for this. For instance, you can open several devices with different labels and the close then in whatever order you'd like: > library("R.devices") > devSet("foo") > plot(1:10) > devSet("bar") > plot(10:1) > devSet("foo") > points(10:1) > devSet("bar") >

Re: [R] close specific graphics device

2015-12-15 Thread Sarah Goslee
You could keep track of the device number using dev.cur() when you create the plot, and some combination of dev.set() dev.list() dev.close(which=mydev) to manage them. Sarah On Tue, Dec 15, 2015 at 3:51 PM, Dalthorp, Daniel wrote: > dev.off(which) can be used to close a

Re: [R] close specific graphics device

2015-12-15 Thread Jim Lemon
Hi Dan, The range of device numbers seems to be 1-63. There doesn't appear to be a means of explicitly setting the device number when calling dev.new, and devices are numbered sequentially when they are opened. This means that even if you did know that the device number was, say, 4 it would be

[R] close specific graphics device

2015-12-15 Thread Dalthorp, Daniel
dev.off(which) can be used to close a specific graphics device where "which" is the index of the device, but is there a way to assign a custom number (or name) to a windows device so that specific window can be later closed via dev.off (or some other method) if it is open? The following does NOT