Description Usage Arguments Examples
This is the interface from learnr to checkr. You don't call this function directly: that will be
done by learnr. Instead, you have to tell learnr to use this function. Do this with a directive
in the setup chunk of the learnr document: tutorial_options(exercise.checker = checkr::check_for_learnr)
| 1 2 3 | 
| label | argument passed by learnr system | 
| user_code | ditto | 
| solution_code | ditto | 
| check_code | ditto | 
| envir_result | ditto | 
| evaluate_result | ditto | 
| ... | ditto | 
| debug | development flag to turn on logging of the information sent by learnr. This must be set at compile time, it's not for users. | 
| 1 2 3 4 5 6 7 8 | # as it would be called from the learnr system ...
check_for_learnr(envir_result = 3, label = "first", user_code = "sin(pi)",
  check_code = 'ex <- for_checkr(USER_CODE)
                t1 <- line_where(ex, insist(F == "sin", "Please use the sin function."))
                a1 <- arg_number(t1, 1); check(a1, passif(V == pi, "Right-oh!"))'
)
#'
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.