invisible
Change the Print Mode to InvisibleReturn a (temporarily) invisible copy of an object.
invisible(x)
x | an arbitrary R object. |
This function can be useful when it is desired to have functions return values which can be assigned, but which do not print when they are not assigned.
This is a primitive function.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
withVisible
, return
, function
.
# These functions both return their argument f1 <- function(x) x f2 <- function(x) invisible(x) f1(1) # prints f2(1) # does not
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.