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 at r-project.org on behalf of Joris.Meys at 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