Hi all,
I'm new to Numbas and probably getting ahead of myself ... but here is what I'm hoping to do in a nutshell: run R code (written by me, not submitted by student) to drive the answers to either numeric or SBA questions. The context is students working through a guided data analysis in their own time, and answering questions in the "exam" as they go along.
I'm failing at the first hurdle, as it were; I've tried to use a trivial bit of R to define a Numbas variable, thus:
- a "string" variable called myRcode, with my R code
- a "JME code" variable, value set to `run_code("webr", myRcode)'
- `Programming` extension enabled under "Extensions & scripts"
Admittedly, I don't even understand yet how the R output would be interfaced with the "JME code" variable, but I don't get that far because the JME code variable doesn't know about the run_code() function:
Error evaluating variable code_runner: No definition of 'run_code' of correct type found.
I'm aware of the "Code" type question part, but my understanding is this isn't what I need.
Many thanks, Swidbert