Skip to main content
Evaluation type: eval R

Everything you need to know about the evaluation type: eval R

Updated over a week ago

With this evaluation type, you can type your own R code in the Definition field to evaluate the student’s answer. The solution/feedback rule will be activated only if the R code returns TRUE. If you want to use Maxima code instead of R code, you can use the evaluation type eval statement. If you want to use Python instead of R, you can use the evaluation type eval Python.

The student’s answer can be accessed in two ways.

  • Use answer for the student’s answer in the answer field that belongs to the solution/feedback rule. The answer variable will be in R syntax.

  • Use answers for a list of student answers of all answer fields, like c(1,2,3). The values in this list will be in Maxima syntax and not in R syntax, so we advise to only use this in case a numeric answer is expected. The list starts with index 1. In case an answer value is empty, the list entry for this answer field will be NULL.

Example 1:

Example 2:

Note that this evaluation type does not have automated feedback.

More on evaluation types

An overview of all evaluation types can be found here (for mathematical answers) and here (for text-based answers). More detail on the different fields of a feedback rule can be found here.


Did this answer your question?