Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_s3_generic

Determine if a function is an S3 generic or S3 method.


Description

is_s3_generic compares name to .knownS3Generics and .S3PrimitiveGenerics, then looks at the function body to see if it calls UseMethod().

is_s3_method builds names of all possible generics for that function and then checks if any of them actually is a generic.

Usage

is_s3_generic(name, env = parent.frame())

is_s3_method(name, env = parent.frame())

Arguments

name

Name of function.

env

Base environment in which to look for function definition.


roxygen2

In-Line Documentation for R

v7.1.1
GPL (>= 2)
Authors
Hadley Wickham [aut, cre, cph] (<https://orcid.org/0000-0003-4757-117X>), Peter Danenberg [aut, cph], Gábor Csárdi [aut], Manuel Eugster [aut, cph], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.