Add Logging to Functions
Overview
Decorate functions to make them return enhanced output. The enhanced output consists in an object of type 'chronicle' containing the result of the function applied to its arguments, as well as a log detailing when the function was run, what were its inputs, what were the errors (if the function failed to run) and other useful information. Tools to handle decorated functions are included, such as a forward pipe operator that makes chaining decorated functions possible.
New features
read_log()now has "pretty", "table", and "errors-only" styles for viewing pipeline logs.- New
write_chronicle_dffunction which writes data frames to .csv or .xlsx formats alongside their logs. as.data.framewill coerce achronicleobject to data frame if its value can be coerced to data frame.- New
zap_logfunction that resets the log of achronicleobject. - Named arguments can now be passed to functions.
- ggplots can now be recorded as well. If a plot fails, it returns "an error" plot: a red box with the error message shown on it. This allows documents that use plots that might need more tweaking to still be compiled.
Chores
- General code cleanup.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 19
- Examples that run
- 87%13 run in a plain check · 2 never run
- Exported functions with examples
- 88%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Dependencies
Installing chronicler adds 28 packages (13 with compiled code, 17 MB of source tarballs). Heaviest: ggplot2 6.0 MB, isoband 1.5 MB, farver 1.2 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.3.0Latest2025-08-18 · current release · diff ↗ ·
removed 1 export
pickadded 4 exports
record_ggplot, unveil, write_chronicle_df, zap_log - RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.2.22024-03-20 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.2.12023-02-03 · diff ↗
- 0.2.02022-05-17
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-05-17
- Total releases
- 4 / 4 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 214 KB / 1 file
- Download size
- 389 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("chronicler")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.