Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More metadata for routines and S3 methods #13

Open
MichaelChirico opened this issue Nov 28, 2023 · 4 comments
Open

More metadata for routines and S3 methods #13

MichaelChirico opened this issue Nov 28, 2023 · 4 comments

Comments

@MichaelChirico
Copy link

It's not particularly interesting in most cases to follow "virtual" objects like .__C__(:

subset(rcheology, startsWith(name, ".__"))

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 at methods("$") in a more recent version of R will not find it. Looking for startsWith(name, "$.") probably works for $ but I'm not sure about S3 generics generally.

@hughjonesd
Copy link
Owner

This sounds good. I'd accept a patch.

@hughjonesd
Copy link
Owner

The help for ls says that all.names=TRUE simply includes anything that starts with a dot .. Is there anything else to check?

@hughjonesd
Copy link
Owner

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?)

@hughjonesd
Copy link
Owner

Note the new column "hidden" in 4.3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants