How do you print to stderr in R?

前端 未结 5 1701
有刺的猬
有刺的猬 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 02:54

    Actually the following works for me:

    write("prints to stderr", stderr())
    
    write("prints to stdout", stdout())
    

提交回复
热议问题