checkdownGet the stable version from CRAN:
… or get the development version from GitHub:
The main goal of this package to create checking fields and boxes in rmarkdown. It could be used in class, when teacher share materials and tasks, so student can solve some problems and check themselves. It is really important since some students are too shy to ask a question, so you can create tasks that will check on the fly the understanding of the class material and give some hints to those students that get stuck. In contrast with the learnr package the checkdown package works without shiny. Load the library:
check_question() functionImagine that we want to create a checkbox with the answer 4. All you need is to create a following chunk with the chunck atribute results='asis' in your rmarkdown document:
It is possible to change wrong and right answer’s messages using wrong and right arguments of the check_question() function. Let’s create some more questions.
Solve 3+3:
Type la-la:
Number of answers is not limited:
It is also possible to create a list of answers for students to choose:
check_hint() functionSometimes you now in advance what kind of mistakes will your students do. Some students are shy and don’t like ask questions, so hints could partially solve this problem. Again all you need is to create a following chunk with the chunck atribute results='asis' in your rmarkdown document:
Click here to see/close the hint
Of course it is possible to change the message:
CLICK HERE
It is possible to use Markdown inside messages:
Click heRe
.html. Just use the chunk argument echo=FALSE.checkdown works only with html output and will not print anything for other otputs.