rk.embed.device {rkward}R Documentation

Embed non-RKWard device windows

Description

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.

Usage

rk.embed.device(expr)

Arguments

expr

Expression to evaluate.

Details

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.

Note

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.

See Also

RK

Examples


## Not run:
rk.embed.device (grDevices::X11(title="X11 device window"))
plot (rnorm (10))


[Package rkward version 0.6.5 Index]