start_log | R Documentation |
Start tracking an R object
start_log(data, logger = simple$new(), label = NULL)
data |
An R object. |
logger |
A logging object (typically an environment wrapped in an S3 class) |
label |
|
All loggers that come with lumberjack support labeling. The label is
used by dump
methods to create a unique file name for each
object/logger combination.
If label
is not supplied, start_log
attempts to create a label
from the name of the data
variable. This probably fails when
data
is not a variable but an expression (like read.csv...
). A
label is also not created when data is passed via the lumberjack not-a-pipe
operator. In that case the label is (silently) not set. In cases where
multiple datasets are logged with the same type of logger, this could lead
to overwriting of dump files, unless file
is explicitly defined when
calling dump_log
.
Other control:
%>>%()
,
dump_log()
,
get_log()
,
run_file()
,
stop_log()
logfile <- tempfile(fileext=".csv")
women %L>%
start_log(logger=simple$new()) %L>%
transform(height_cm = height*2.52) %L>%
dump_log(file=logfile)
logdata <- read.csv(logfile)
head(logdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.