Learn R Programming

R.methodsS3 (version 1.4.2)

isGenericS3: Checks if a function is a S3/UseMethod generic function

Description

Checks if a function is a S3/UseMethod generic function.

Usage

## S3 method for class 'default':
isGenericS3(fcn, envir=parent.frame(), ...)

Arguments

fcn
A function or a character string.
envir
If argument fcn is a character, this is the environment from which the search for the
...
Not used.

Value

  • Returns TRUE if a generic S3/UseMethod function, otherwise FALSE.

Details

A function is considered to be a generic S3/UseMethod function if its body, that is the source code, contains the regular pattern "UseMethod[(]".