In R some functions can print information and return values, can the print be silenced?
For example:
print.and.return <- function() {
print("foo")
return("bar")
}
returns
> print.and.return()
[1] "foo"
[1] "bar"
>
I can store the return like:
> z <- print.and.return()
[1] "foo"
> z
[1] "bar"
>
Can I suppress the print of "foo"
?