GetCallerInfo: Get Caller Name

View source: R/24_caller_cli.R

GetCallerInfoR Documentation

Get Caller Name

Description

Retrieves the name of the function that called the current execution context. If called from the global environment, returns "global".

Usage

GetCallerInfo(offset = 2L)

Arguments

offset

Integer. The number of stack frames to go back. Defaults to 2 (skipping the GetCallerInfo frame and the Wrapper frame to find the User's function).

Value

Character string. E.g., "my_function()" or "global".

Examples

## Not run: 
f <- function() { GetCallerInfo() }
f() # Returns "f()"

## End(Not run)


SigBridgeRUtils documentation built on Sept. 29, 2026, 5:09 p.m.