[R-pkg-devel] CRAN student assistants

Martin Morgan mtmorg@n@b|oc @end|ng |rom gm@||@com
Wed May 15 13:41:16 CEST 2019


message() / warning() / stop() write to stderr whereas print() / cat() write (by default) to stdout. Even without being able to suppress messages, it is well-established practice (the story is that this is the reason why 'stderr' was introduced into unix, https://www.jstorimer.com/blogs/workingwithcode/7766119-when-to-use-stderr-instead-of-stdout ) to separate diagnostic messages from program output. I agree that gargle (in particular, and packages in general, given the theme of this mailing list) would be a better package if it used message() where it now uses cat().

Martin

On 5/15/19, 5:04 AM, "R-package-devel on behalf of Joris Meys" <r-package-devel-bounces using r-project.org on behalf of Joris.Meys using ugent.be> wrote:

    2) Where cat() is used in gargle, message() is a better option for the
    following reason:
    
    > myfun <- function(){cat("Yes");message("No")}
    > suppressMessages(myfun())
    Yes
    
    


More information about the R-package-devel mailing list