logcat(..., label="Note")
cat
function
for printing.
If the environment variable S_LOGFILE is defined, then
logcat(message)
will write the label "Note" and the message to end of the file given by
getenv("S_LOGFILE")
.
If
options()$verbose
is
TRUE
,
the label and message will be written to the standard output also.
options(verbose=T) setenv("S_LOGFILE", "slogfile.txt") logcat("The dataset fuel.frame has dimensions", nrow(fuel.frame), "by", ncol(fuel.frame)) # Note The dataset fuel.frame has dimensions 60 by 5 # The file slogfile.txt should contain the same note.