knitr::opts_chunk$set(comment = "") report_code_event <- function(tutorial_id, tutorial_version, user_id, event, data) { if (is.null(data$code)) return() rlang::inform(sprintf("---- %s ----\n%s", event, capture.output(dput(data$code)))) } options(tutorial.event_recorder = report_code_event)
https://github.com/rstudio/learnr/issues/691
Reveal the hint, copy and paste into the exercise, and run.
c( 1, 2, 3 )
Expected output:
::: {#ex1-expected-output}
:::
Reveal the solution, copy and paste into the exercise, and run.
c( "apple", "banana", "coconut" )
Expected output:
::: {#ex2-expected-output}
:::
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.