The logr package contains functions to easily create log files.

Details

The logr package helps create log files for R scripts. The package provides easy logging, without the complexity of other logging systems. It is designed for analysts who simply want a written log of the their program execution. The package is designed as a wrapper to the base R sink() function.

How to use

There are only three logr functions:

The log_open() function initiates the log. The log_print() function prints an object to the log. The log_close() function closes the log. In normal situations, a user would place the call to log_open at the top of the program, call log_print() as needed in the program body, and call log_close() once at the end of the program.

Logging may be controlled globally using the options "logr.on" and "logr.notes". Both options accept TRUE or FALSE values, and control log printing or log notes, respectively.

See function documentation for additional details.

Author

Maintainer: David Bosak dbosak01@gmail.com

Other contributors:

  • Rikard Isaksson [contributor]