| rk.embed.device {rkward} | R Documentation |
rk.embed.device evaluates the given expression, and if this has created a window on the screen, tries to embed it as an RKWard window.
rk.embed.device(expr)
expr |
Expression to evaluate. |
Theoretically, expr can be any valid R expression. However typically this should be calls to X11(), Windows(), or, perhaps dev.copy().
Importantly, the expression should create exactly one new window for rk.embed.device() to work. Keep in mind, that this is not
always the case for plot(...) and similar commands, which will re-use an existing plot window, if available.
rk.embed.device() will not work on all platforms (most importantly, not in most MacOSX binaries). Further, note that a captured
X11() or Windows device may look similar to an RK() device, but is actually a very different thing. Capturing a
window already "owned" by RKWard (importantly, RK() device windows) may lead to unexpected results, including crashes.
## Not run: rk.embed.device (grDevices::X11(title="X11 device window")) plot (rnorm (10))