testrmd::init()
By adding test: FALSE
to your YAML params you can stop test chunks from being evaluated throughout the document. If the parameter is set to test: TRUE
, test chunks will run as usual.
params: test: FALSE
This test parameter is passed into your chunk options using eval = params$test
, as shown below.
```r counts <- c(1, 2, 3, 4.5) stopifnot( is.numeric(counts), all(counts >= 0), isTRUE(all.equal(counts, round(counts))) ) ```
To run selected test chunks within the same document, you simply exclude the eval
option for an individual chunk, or expressly set the chunk option to eval = TRUE
.
```r library(assertthat) assert_that(is.numeric(y)) ```
library(assertthat) assert_that(is.numeric(y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.