isS3stdGeneric

0th

Percentile

Check if a function acts as an S3 generic

Determines whether f acts as a standard S3-style generic function.

Keywords
utilities
Usage
isS3stdGeneric(f)
Arguments
f

A function object

Details

A closure is considered a standard S3 generic if the first expression in its body calls UseMethod. Functions which perform operations before calling UseMethod will not be considered “standard” S3 generics.

Value

If f is an S3 generic, a logical vector containing TRUE with the name of the S3 generic (the string passed to UseMethod). Otherwise, FALSE (unnamed).

Aliases
  • isS3stdGeneric
Documentation reproduced from package utils, version 3.4.1, License: Part of R 3.4.1

Community examples

Looks like there are no examples yet.