?invisible
says
Return a (temporarily) invisible copy of an object.
That parenthetical implies that the invisibility will not last forever, but I can't find anything that explains when it goes away. I'm particularly wondering about constructs like this one (from this old answer of mine):
printf <- function(...) invisible(print(sprintf(...)))
where the outer invisible
is probably unnecessary (because print
already marked its return value invisible). withVisible()
reports that this function's return value is invisible either way, but I don't know whether that is guaranteed by the language, or just the way it happens to work in the current implementation.