Learn R Programming

lumberjack (version 1.3.1)

simple: The simple logger

Description

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

Arguments

Format

An R6 class object.

Creating a logger

simple$new(verbose=TRUE)

verbosetoggle verbosity

Dump options

$dump(file=NULL,...)

filefilename 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

Run this code

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)

Run the code above in your browser using DataLab