match.generic.call: (Internal) match.call() with handling of generic function.

View source: R/utils.r

match.generic.callR Documentation

(Internal) match.call() with handling of generic function.

Description

Some generic functions have different arguments for different classes. In such cases, match.call() function returns wrong results. This function finds actual generic function called for focal class and matches call with the function. If call is not a call for non-generic function, matching is done by match.call() function.

Usage

match.generic.call(call, envir, package = "")

Arguments

call

a call to be matched.

envir

an environment to evaluate call.

package

a character string representing package name of the funciton.

Details

If an object has more than two classes, the first class in the result of class() with generic function is used.

Value

matched fully-named call.

Examples

     model.adapter:::match.generic.call(
         substitute(hist(1:10)), environment()
     )

Marchen/model.adapter documentation built on July 3, 2023, 11:07 a.m.