Description Usage Arguments Details Examples
In {learnr}
, the results of running an exercise are posted below the code-entry
box. When there are multiple commands, this breaks the direct link between the command
itself and the printed results. capture()
prints out both the command and the result
along with an optional message. annot()
turns a character string into a line
that looks like a comment.
1 |
cmd |
An R expression, typically piped into |
message |
a comment to print after the result of cmd. |
You must use the built-in pipe (|>
) into capture()
. Use whatever
you like to the left of |>
.
Meant for results that are very short vectors, either numeric or character string.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.