runCode/run_code method to run R code inside the sandbox.
You’ll need to pass the language parameter with value r.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
runCode/run_code method to run R code inside the sandbox.
You’ll need to pass the language parameter with value r.
import { Sandbox } from '@e2b/code-interpreter'
const sbx = await Sandbox.create()
const execution = await sbx.runCode('print("Hello, world!")', { language: 'r' })
console.log(execution)
from e2b_code_interpreter import Sandbox
sbx = Sandbox.create()
execution = sbx.run_code('print("Hello, world!")', language="r")
print(execution)
Was this page helpful?