Skip to contents

This achieves the same effect as grDevices::dev.off(), but will only close the device if it has the unigd type.

Usage

ugd_close(which = dev.cur(), all = FALSE)

Arguments

which

Which device (ID).

all

Should all running unigd devices be closed.

Value

Number and name of the new active device (after the specified device has been shut down).

Examples

ugd()
hist(rnorm(100))
ugd_close() # Equvalent to dev.off()
#> agg_png 
#>       2 

ugd()
ugd()
ugd()
ugd_close(all = TRUE)