How can you always suppress messages in R?

后端 未结 1 435
臣服心动
臣服心动 2020-12-18 04:49

The most common place I\'ve seen messages used in R is in the starting of a package. Suppressing one function\'s worth of messages is easily accomplished with suppres

相关标签:
1条回答
  • 2020-12-18 05:51

    Use the type parameter in sink

    # Open a file to send messages to
    zz <- file("messages.Rout", open = "wt")
    # Divert messages to that file
    sink(zz, type = "message")
    message("not gonna show up in console")
    
    0 讨论(0)
提交回复
热议问题