test-dont | R Documentation |
Test case: don't
Other tests:
index
,
test-crayon
,
test-figures
,
test-links
,
test-lists
,
test-long-lines
,
test-output-styles
,
test-params
,
test-sexpr-title
,
test-verbatim
## Not run:
abort("This is an error!")
## End(Not run)
# Inline \donttest is silently ommitted
message("Hi!")
# Block \donttest indicated with comments
# This is a comment
1 + 3
# And works even when not at the top level
if (TRUE) {
1 + 2
}
answer <- 1
answer # should be 42
# To hide the \dontshow part, for conditional examples
answer <- 43
answer # should be still 42
# But this one runs, and the condition is hidden
answer <- 43
answer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.