S4 missing or NULL arguments to methods?
Is there a way to define what happens when the argument of a method is missing or NULL?
In the example below, I'd like to call the same function no matter whether I type
foo(NULL). Of course I know that I can have a method
setMethod("foo","NULL",function(x) foo()) but that that's code replication and a possible source of mistakes.