Please see the manual page for grDevices::dev.off(). Package rasterpdf
overrides the function in order to provide functionality of raster_pdf(),
but internally calls grDevices::dev.off().
dev.off(which = grDevices::dev.cur())
| which | An integer that specifies the device number. Default is the current device. |
|---|
#> pdf #> 2