R Shell

An interactive R Shell that can be used to execute R commands in the cloud using OpenCPU.

Example:

<RShell
    code="abs(c(-2,3,-1))"
/>

Options:

  • code: R code string to be evaluated. Default: ''.
  • disabled: boolean indicating whether to disable all user inputs and make the code block static. Default: false.
  • fontSize: number specifying the used font size in the shell window. Default: 16.
  • fontFamily: string denoting the font-family used in the shell window. Default: Courier New.
  • hints: For programming questions, an Array of strings providing guidance on how to approach the problem. Default: [].
  • libraries: Array of R libraries that should be loaded automatically when the input code is executed. Default: [].
  • lines: number specifying how many lines to display. Default: 5.
  • onEvaluate: Callback function that is invoked whenever the Evaluate button is clicked. Default: null.
  • onResult: Callback function that is invoked whenever the result of a code execution is obtained from the cloud. The result string is passed as the only argument to the callback function. Default: null.
  • prependCode: string or an Array of R code to be prepended to the code stored in code when evaluating. Default: ''.
  • solution: For programming questions, an R code string representing the official solution can be supplied. Default: ''.

results matching ""

    No results matching ""