library(learnr) tutorial_options(exercise.checker = function(user_code, ...) return(user_code)) knitr::opts_chunk$set(echo = FALSE)
x <- 1 + 1
1 + 1
check_this_exercise(user_code, solution_code)
1 + 1 # one plus two ---- 1 + 2 # one plus three ---- 1 + 3 # one equals three ---- 1 = 3 # 2 minus one ---- 2 - 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.