Dear All
I'm logging the stdout and stderr of an R program into two separate
files (stderr.txt and stdout.txt) using sink()
I would like to append extra information such as date, memory
usage etc to every line of output that goes to stdout or stderr.
For example
cat(hello \n)
should give
Is this actually possible?
Yes. All R output to stdout/stderr that will get redirected by sink()
passes through a connection. You can modify the sources to make a
connection which adds info. Whether the information you want is available
at that point is another matter -- and for things
2 matches
Mail list logo