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-tables
,
test-verbatim
# \dontrun{} --------------------------------------------------------
# always shown; never run
x <- 1
## Not run: x <- 2
## Not run:
x <- 3
x <- 4
## End(Not run)
x # should be 1
# \donttest{} -------------------------------------------------------
# only multiline are shown; always run
x <- 1
x <- 2
x <- 3
x <- 4
x # should be 4
# \testonly{} -----------------------------------------------------
# never shown, never run
x <- 1
x # should be 1
# \dontshow{} -------------------------------------------------------
# never shown, always run
x <- 1
x # should be 4
# @examplesIf ------------------------------------------------------
# If FALSE, wrapped in if; if TRUE, not seen
x <- 1
x <- 2
x <- 3
x # should be 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.