simple: The simple logger

simpleR Documentation

The simple logger

Description

Record for each expression a POSIXct timestamp and a logical indicating whether the tracked object has changed.

Format

An R6 class object.

Creating a logger

simple$new(verbose=TRUE)

verbose toggle verbosity

Dump options

$dump(file=NULL,...)

file filename or connection to write output to.
... extra options passed to write.csv, except row.names, which is set to FALSE.

The default location is "simple.csv" in an interactive session, and "DATA_simple.csv" in a script that executed via run_file. Here, DATA is the variable name of the data being tracked or the label provided with start_log.

Get data

$logdata() Returns a data frame with the current log.

See Also

Other loggers: cellwise, expression_logger, filedump, no_log

Examples


logfile <- tempfile(fileext=".csv")
out <- women %L>%
  start_log(log=simple$new(verbose=FALSE)) %L>%
  identity() %L>%
  head() %L>% 
  dump_log(file=logfile, stop=TRUE)


read.csv(logfile,stringsAsFactors=FALSE)


lumberjack documentation built on March 31, 2023, 7:56 p.m.