library(learnr) library(nycflights13) options(tutorial.event_recorder = learnr:::debug_event_recorder) tutorial_options( exercise.eval = FALSE, exercise.checker = function(label, user_code, envir_result, ...) { if (is.null(envir_result)) list(message = "Bad code!", correct = FALSE) else list(message = "Nice job!", correct = TRUE, location = "append") }, exercise.completion = TRUE, exercise.diagnostics = TRUE )
autocompletion <- list(apple = 1, banana = 2, cherry = 3)
# Try typing here
# Try typing here
# no diagnostics here
# diagnostics here
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.