Displaying 1 result from an estimated 1 matches for "baseconstrvec".
2006 Nov 24
1
Missing values for S4 slots
Using R 2.4, the following fails:
setClass("testc", representation(a="ANY"))
makeC <- function(myarg) new("testc", a=myarg)
makeC()
-> Error in initialize(value, ...) : argument "myarg" is missing,
with no default
On the other hand, this is OK:
f <- function(a) g(b=a)
g <- function(b) if(missing(b)) "missing" else "valid