get_caller: get_caller

Description Usage Arguments Value Examples

Description

A friendly R debugging / troubleshooting function that returns the calling function from the stack.

Usage

1
get_caller(level = 0, verbosity = NULL, ...)

Arguments

level

(Scalar integer) The level to climb up the stack.

Value

(character) The calling function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_caller()
f1 <- function(level = NULL) { return(get_caller(level = level)) }
f1()
f1(level = 0)
f1(level = 1)
f1(level = 2)
f2 <- function(level = NULL) { return(get_caller(level = level)) }
f2()
f2(level = 0)
f2(level = 1)
f2(level = 2)

daviddoret/GRCRToolkit documentation built on May 23, 2019, 7:31 a.m.