getCode: Retrieve the generated code from a JavaScript canvas device

Description Usage Arguments Value Author(s) See Also Examples

Description

This function and methods provides a mechanism by which we can retrieve the generated JavaScript code from an existing JavaScript Canvas graphics device. The code is only generated when the device is closed, but we can retrieve the code from the device object after it is closed.

NOTE: the graphics device is being destroyed eventhough we have a reference to it in an R object. We have to avoid this destruction in this case by putting our own finalizer. For now, don't use getCode.

Usage

1
getCode(from, ...)

Arguments

from

the RJavaScriptCanvasDevice

...

additional parameters for methods

Value

A character vector

Author(s)

Duncan Temple Lang

See Also

jsCanvas

Examples

1
2
3
4
5
  dev = jsCanvas()
  r = dev$deviceSpecific$state@result
  plot(1:10)
  dev.off()
  r()

omegahat/RJSCanvasDevice documentation built on May 24, 2019, 1:54 p.m.