Skip to content

Find S3 method from its name

Usage

s3_get_method(name)

Arguments

name

A string or unquoted symbol

Value

A function, or an error stating why the method could not be found

Examples

s3_get_method(mean.Date)
#> function (x, ...) 
#> .Date(mean(unclass(x), ...))
#> <bytecode: 0x55985d2f9108>
#> <environment: namespace:base>
s3_get_method(weighted.mean.Date)
#> function (x, w, ...) 
#> .Date(weighted.mean(unclass(x), w, ...))
#> <bytecode: 0x55985d4b5b20>
#> <environment: namespace:stats>