Displaying 1 result from an estimated 1 matches for "numericornull".
2009 Feb 11
1
setClassUnion with numeric; extending class union
...please correct me if I
am wrong. The best solution I came up with so far was the following (it
also indicates a problem of using setClassUnion with numeric as one of
the classes):
I define a class union of numeric and NULL:
Unfortunately the following works only with warnings:
setClassUnion("numericOrNULL", c("numeric","NULL"))
So I do a workaround as:
setClass("aNumeric", contains="numeric")
setClassUnion("numericOrNULL", c("aNumeric","NULL"))
Then I cannot really extend the above virtual class and can only use it
in a us...