Open MichaelChirico opened 10 months ago
This sounds good. I'd accept a patch.
The help for ls
says that all.names=TRUE
simply includes anything that starts with a dot .
. Is there anything else to check?
Another issue: I can call methods(generic)
but how do I know which things are generics? utils::isS3stdGeneric
only exists in 3.4.0 and beyond.
Option 1: backport it.
Option 2: use methods(class=...)
for a fixed set of classes. (But which?)
Note the new column "hidden" in 4.3.2.0.
It's not particularly interesting in most cases to follow "virtual" objects like
.__C__(
:It would be nice to have a metadata column to exclude those "officially" rather than using regex to do so, perhaps unreliably.
It would also be nice to have S3 methods like
$.data.frame
tagged as such. Mostly, such objects are not called directly in user code, and some use cases wouldn't care if new methods are added to existing S3 generics.Moreover, it is basically impossible to correctly exclude these objects on your own, because e.g.
$.data.frame
was removed after 3.5.3, so looking atmethods("$")
in a more recent version of R will not find it. Looking forstartsWith(name, "$.")
probably works for$
but I'm not sure about S3 generics generally.