R Plot

Component for rendering an R plot inside an ISLE lesson.

Example:

<RPlot code="hist( c(20,50,40,70,40,30) )" />

Open interactive preview

Options:

  • code | string: R code to generate the plot. Default: ''.
  • width | (number|string): width of the plot (in px). Default: 600.
  • height | (number|string): height of the plot (in px). Default: 350.
  • fileType | string: file type of the plot (png or svg). Default: 'png'.
  • libraries | array: R libraries that should be loaded automatically when the input code is executed. Default: [].
  • prependCode | (string|array): string or an array of R code snippets to be prepended to the code stored in code when evaluating. Default: ''.
  • onDone | function: callback invoked with err, img and body arguments once a plot is created. Default: onDone() {}.

results matching ""

    No results matching ""