Skip to content

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

@MichaelChirico

Description

@MichaelChirico
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions