library(learnr)
tutorial_options(exercise.checker = function(user_code, ...) return(user_code))
knitr::opts_chunk$set(echo = FALSE)

Test Cases

Exercise

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


rstudio/learnr documentation built on Sept. 6, 2024, 11:06 p.m.