Stop an R program without error

前端 未结 9 1633
执笔经年
执笔经年 2020-12-01 10:35

Is there any way to stop an R program without error?

For example I have a big source, defining several functions and after it there are some calls to the functions.

9条回答
  •  孤街浪徒
    2020-12-01 11:29

    In addition to answer from Stibu on Mar 22 '17 at 7:29, if you want to write a message as a part of stop(), this message is not written.

    I perceive strange that following two lines have to be used meaning on.exit(options(options(show....))) doesn't work.

    opt <- options(show.error.messages = F)
    on.exit(options(opt))
    

提交回复
热议问题