On Wed, Jul 10, 2013 at 10:50 AM, Kasper Daniel Hansen <[email protected]> wrote: > > On Wed, Jul 10, 2013 at 12:38 PM, Dan Tenenbaum <[email protected]> wrote: >> >> On Wed, Jul 10, 2013 at 9:17 AM, Michael Lawrence >> <[email protected]> wrote: >> > If it's an informational message, like one you might log, use message(). >> > If >> > you're rendering an object as text, like in a show method, use cat(). >> > >> >> Another thing to consider is that messages can be suppressed with >> suppressMessages() but cat() output cannot. > > > Sure. What I cannot decide is whether that is good or bad. >
In terms of being a good citizen, it's good; but sounds like you are also providing a verbose option that can be turned off (or is off by default) so that's another path to good citizenship. However, if your package is at the bottom of a big dependency tree, the user may not be aware of the package-specific way to suppress output but they might be aware of suppressMessages(). Up to you.... Dan > Kasper > > > >> >> >> Dan >> >> >> > Just my opinion, >> > Michael >> > >> > >> > On Wed, Jul 10, 2013 at 8:24 AM, Kasper Daniel Hansen < >> > [email protected]> wrote: >> > >> >> Should I use cat() or message() (or something else) for >> >> if(verbose) cat("my message\n") >> >> >> >> Best, >> >> Kasper >> >> >> >> [[alternative HTML version deleted]] >> >> >> >> _______________________________________________ >> >> [email protected] mailing list >> >> https://stat.ethz.ch/mailman/listinfo/bioc-devel >> >> >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > [email protected] mailing list >> > https://stat.ethz.ch/mailman/listinfo/bioc-devel > > _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
