Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Martin Morgan
I did ?"NULL at the command line and was lead to ?"NULL-class" and the BasicClasses help page in the methods package. getClass("NULL"), getClass("character") show that these objects are unrelated, so a class union is the way to define a class that is the union of these. The essence of the behav

[Rd] bquote doc and splicing data frames

2020-09-24 Thread Antoine Fabri
Dear r-devel, The doc of bquote doesn't describe what inputs are allowed in `..()`, it says : *terms wrapped in ..() are evaluated and spliced into a call.* I think "terms" is not clear enough, it might make the user think that several arguments are possible, and the fact that `..()` (and `.()`

Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Abby Spurdle
Hi Martin, Thankyou for your response. I suspect that we're not going to agree on the main point. Making it trivially simple (as say Java) to set slots to NULL. So, I'll move on to the other points here. ***Note that cited text uses excerpts only.*** > setClassUnion("character_OR_NULL", c("cha

Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Martin Morgan
Answering to convey the 'rules' as I know them, rather than to address the underlying issues that I guess you are really after... The S4 practice is to use setOldClass() to explicitly treat an S3 character() vector of classes as an assertion of linear inheritance > x <- structure (sqrt (37), cl

Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Robert Harlow
It seems one of the primary reasons to use the S4 system is *to be strict about types.* IMO the documentation is quite clear on this point, if NULL is not a subclass of character, which it isn't because inherits(NULL, "character") is FALSE then everything is behaving exactly as expected and docume