Inspired by: http://www.omegahat.net/RGraphicsDevice/overview.html

rdevice(rfunction, ..., device_name = "rdevice")

Arguments

rfunction

a function (preferred) or a character string (soft-deprecated) containing name of callback function which will handle the device calls.

...

all other named, non-NULL arguments are passed into the device as `rdata`

device_name

name to use for the device. default: "rdevice"