In R some functions can print information and return values, can the print be silenced?
For example:
print.and.return <- function() { print(\"foo\
If you absolutely need the side effect of printing in your own functions, why not make it an option?
print.and.return <- function(..., verbose=TRUE) { if (verbose) print("foo") return("bar") } > print.and.return() [1] "foo" [1] "bar" > print.and.return(verbose=FALSE) [1] "bar" >