time_chunk | R Documentation |
knitr
chunks, by default, all of themThis function takes knitr's official example on using chunk hooks to report how much time each chunk takes to run: https://bookdown.org/yihui/rmarkdown-cookbook/time-chunk.html
time_chunk(all = TRUE)
all |
whether to time all chunks by default (set the default value for
chunk option |
And just wrap it in a function so you can simply write efun::time_chunk()
in your top chunk, instead of the whole example.
## Not run:
# Simply put this line on the top chunk of your .Rmd file
efun::time_chunk(all = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.