log_chunk_time: Automatically log execution time of knitr chunks

View source: R/helpers.R

log_chunk_timeR Documentation

Automatically log execution time of knitr chunks

Description

Calling this function in the first chunk of a document will instruct knitr to automatically log the execution time of each chunk. If using formatter_glue() or formatter_cli() then the options variable will be available, providing the chunk options such as chunk label etc.

Usage

log_chunk_time(..., level = INFO, namespace = NA_character_)

Arguments

...

passed to log_level()

level

see log_levels()

namespace

x

Examples

# To be put in the first chunk of a document
log_chunk_time("chunk {options$label}")


daroczig/logger documentation built on Jan. 31, 2025, 6:56 p.m.