You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I refer to a function via a variable, the class column of s3_methods_generic isn't what I'd expect.
this_func <- mean
sloop::s3_methods_generic("this_func")
#> Warning in .S3methods(generic.function, class, envir): generic function
#> 'this_func' dispatches methods for generic 'mean'
#> # A tibble: 6 x 4
#> generic class visible source
#> <chr> <chr> <lgl> <chr>
#> 1 mean mean.Date TRUE base
#> 2 mean mean.default TRUE base
#> 3 mean mean.difftime TRUE base
#> 4 mean mean.POSIXct TRUE base
#> 5 mean mean.POSIXlt TRUE base
#> 6 mean mean.quosure FALSE registered S3method for mean
sloop::s3_methods_generic("mean")
#> # A tibble: 7 x 4
#> generic class visible source
#> <chr> <chr> <lgl> <chr>
#> 1 mean Date TRUE base
#> 2 mean default TRUE base
#> 3 mean difftime TRUE base
#> 4 mean POSIXct TRUE base
#> 5 mean POSIXlt TRUE base
#> 6 mean quosure FALSE registered S3method
#> 7 mean vctrs_vctr FALSE registered S3method
We already have the "generic" column from utils::method, should it use that for generating the "class" column (rather than x)?
I can PR if there isn't a reason to use the generic_esc that I'm not thinking of; using info from methods seems safer.
The text was updated successfully, but these errors were encountered:
If I refer to a function via a variable, the
class
column ofs3_methods_generic
isn't what I'd expect.We already have the "generic" column from
utils::method
, should it use that for generating the "class" column (rather thanx
)?I can PR if there isn't a reason to use the
generic_esc
that I'm not thinking of; using info from methods seems safer.The text was updated successfully, but these errors were encountered: