R Plot
Component for rendering an R plot inside an ISLE lesson.
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:'auto'
. - draggable |
boolean
: controls whether the plot should be draggable. Default:false
. - fileType |
string
: file type of the plot (png
orsvg
). Default:'svg'
. - libraries |
array
: R libraries that should be loaded automatically when the inputcode
is executed. Default:[]
. - prependCode |
(string|array)
:string
or anarray
of R code snippets to be prepended to the code stored incode
when evaluating. Default:''
. - meta |
object
: plot meta-information. Default:none
. - className |
string
: class name. Default:''
. - onDone |
function
: callback invoked witherr
,img
andbody
arguments once a plot is created. Default:onDone() {}
.
Examples
- Minimal
- Draggable
- Custom Dimensions
- Using Libraries
Live Editor
Result
ReferenceError: Provider is not defined