powered by
get_caller() Tries to determine the calling functions based on where.
get_caller()
where
get_caller(where = -1L)get_user(fallback = "unknown user")
get_user(fallback = "unknown user")
integer scalar (usually negative). Look up that many frames up the call stack
integer
A fallback in case the user name could not be determined
a character scalar.
character
base::sys.call()
whoami::whoami()
# NOT RUN { foo <- function() get_caller(-1L) foo() get_user() # }
Run the code above in your browser using DataLab