get.function: (Internal) Get function and function name from call

View source: R/utils.r

get.functionR Documentation

(Internal) Get function and function name from call

Description

(Internal) Get function and function name from call

Usage

get.function(call, type = c("function", "character"), envir = parent.frame())

Arguments

call

a call from which extract function.

type

a character vector denoting type of return value. "function" or "character" can be used. "character" is default.

envir

an environment where to evaluate the call.

Value

If type is "function", function object. If type is "character", character literal of function name. Note that if the function in the call is copy of other function, this funciton tries to find original name of it.

Examples

     model.adapter:::get.function(
         substitute(glm(Sepal.Length ~ ., data = iris))
     )

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