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

table(x) is not given an S3 generic overwrite #59

Open
MichaelChirico opened this issue Oct 10, 2024 · 0 comments
Open

table(x) is not given an S3 generic overwrite #59

MichaelChirico opened this issue Oct 10, 2024 · 0 comments

Comments

@MichaelChirico
Copy link
Collaborator

debugonce(table.integer64)          # set a stopping point
invisible(table(as.integer64(1:3))) # not hit

Other integer64 implementations rely on S3 generics being put in place by {bit64} itself, e.g.

bit64/R/patch64.R

Lines 141 to 144 in f9d1ef3

if (!exists("match.default")){
match <- function(x, table, ...) UseMethod("match")
match.default <- function(x, table, ...) base::match(x, table, ...)
}

Currently the user has to call table.integer64() directly to access this code. I don't see anyone having done so:

https://github.com/search?q=lang%3AR+%2F%5B%5E%7B%5Cw.%5Dtable%5B.%5Dinteger64%2F+-path%3Ahighlevel64+-path%3A.rd&type=code

It would be nice for table(x) to "just work" for users to get this custom-tailored implementation.

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

1 participant