time_chunk: Time 'knitr' chunks, by default, all of them

View source: R/rmarkdown.R

time_chunkR Documentation

Time knitr chunks, by default, all of them

Description

This 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

Usage

time_chunk(all = TRUE)

Arguments

all

whether to time all chunks by default (set the default value for chunk option time_it)

Details

And just wrap it in a function so you can simply write efun::time_chunk() in your top chunk, instead of the whole example.

Examples

## Not run: 
# Simply put this line on the top chunk of your .Rmd file
efun::time_chunk(all = TRUE)

## End(Not run)

edalfon/efun documentation built on June 23, 2024, 4:17 a.m.