[Rd] Should invisible() get signature x=NULL?

Michael Chirico ch|r|com @end|ng |rom goog|e@com
Tue Aug 2 00:27:10 CEST 2022


I think most experienced R users are familiar with return(invisible())
being used as shorthand for return(invisible(NULL)).

However, this NULL default is not documented anywhere -- we have to
dive into src/main/print.c:do_invisible to source this behavior.

Is this lack of documentation intentional? Otherwise, should the
signature be updated to reflect this default?

invisible <- function(x = NULL) .Primitive("invisible")

Otherwise, should this default be mentioned in ?invisible ?



More information about the R-devel mailing list