find.original.name: (Internal) Find original name of the function.

View source: R/utils.r

find.original.nameR Documentation

(Internal) Find original name of the function.

Description

(Internal) Find original name of the function.

Usage

find.original.name(fun)

Arguments

fun

a function

Value

a character string of original function name. if the function specified as fun is 'original' of it, this funciton returns name of fun itself. Note that this function cannot work correctly if a copy of the function and the original function are in the same environment.

Examples

a <- ls
model.adapter:::find.original.name(a)

a <- glm
model.adapter:::find.original.name(a)

a <- function() print("test")
model.adapter:::find.original.name(a)

# But in the following situation, this can't work correctly.
test <- function() print("test")
a <- test
model.adapter:::find.original.name(a)

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