hook_rgl

0th

Percentile

Hook functions to use with knitr

These functions allow rgl graphics to be embedded in knitr documents, either as bitmaps (hook_rgl with format "png"), fixed vector graphics (hook_rgl with format "eps", "pdf" or "postscript"), or interactive WebGL graphics (hook_webgl).

Keywords
utilities
Usage
setupKnitr()
hook_rgl(before, options, envir)
hook_webgl(before, options, envir)
Arguments
before, options, envir

Standard knitr hook function arguments.

Details

The setupKnitr() function needs to be called once at the start of the document to install the knitr hooks and to initialize hook_webgl.

The following chunk options are supported:

  • rgl.keepopen: no longer used. Ignored with a warning.

  • rgl.newwindow (default FALSE): Whether to open a new window for the display.

  • rgl.margin (default 100): number of pixels by which to indent the WebGL window.

  • dpi, fig.retina, fig.width, fig.height: standard knitr chunk options used to set the size of the output.

  • dev: used by hook_rgl to set the output format. May be "eps", "postscript", "pdf" or "png" (default: "png").

Value

A string to be embedded into the output, or NULL if called when no output is available.

See Also

rgl.Sweave embeds fixed images in Sweave documents.

Aliases
  • hook_rgl
  • hook_webgl
  • setupKnitr
Documentation reproduced from package rgl, version 0.100.18, License: GPL

Community examples

Looks like there are no examples yet.