knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(atusydown)
By specifying opts.include = TRUE
,
the source chunk returns the chunk including its option except for opts.include
.
Note a limitation that collapse
is ignored.
```r"` 1 ```
gives
1
Similary labelled chunk gives
1
And chunk options starting without comma gives
1
Note that chunk without codes will not be echoed, which is probably a default behavior of R Markdown.
```{sh, opts.include = TRUE} echo "hello"
### Chunks using extra engines in atusydown Currently, engines `glue` and `opts` do not support `opts.include`. ## Measuring elapsed time in a chunk A chunk option with `time = TRUE` returns elapsed time. Specify an integer to `time.digits` to round the time. Otherwise the time rounded by `signif()`. ```` ```r"` `r knitr:::knit_code$get("time")`
````
Sys.sleep(time = 1e-2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.