powered by
This achieves the same effect as grDevices::dev.off(), but will only close the device if it has the unigd type.
grDevices::dev.off()
ugd_close(which = dev.cur(), all = FALSE)
Number and name of the new active device (after the specified device has been shut down).
Which device (ID).
Should all running unigd devices be closed.
ugd() hist(rnorm(100)) ugd_close() # Equvalent to dev.off() ugd() ugd() ugd() ugd_close(all = TRUE)
Run the code above in your browser using DataLab