Dear all,

I am trying to benchmark code that occasionally prints on the screen
and I want to
suppress the printing. Is there an idiom for this?

If I do

sink(tempfile)
microbenchmark(...)
sink()

then I'll be also measuring the costs of writing to tempfile. I could
also sink to /dev/null, which is probably fast, but that is not
portable.

Is there a better solution? Is writing to a textConnection() better?

Thanks, Best,
Gabor

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to