How do you print to stderr in R?

前端 未结 5 1700
有刺的猬
有刺的猬 2020-12-03 02:26

How do you print to stderr in R?

This would especially useful for scripts written in Rscript.

5条回答
  •  甜味超标
    2020-12-03 03:14

    Is it possible to configure the print function to print to stderr?

    From Ripley himself:

    No, but where standard output goes is controlled by sink(), so you can achieve the same effect. R internally has no idea what output comes from print() (which is not just one function but hundreds of methods).

提交回复
热议问题