R/utils-get-args.R

Defines functions get_args

Documented in get_args

#' Get the arguments of the calling function
#'
#' @return a list of the arguments
#'
#' @export
get_args <- function(){

  cl <- sys.call(-1)
  f <- get(as.character(cl[[1]]), mode = "function", sys.frame(-2))
  cl <- match.call(definition = f, call = cl)
  as.list(cl)[-1]
}
pacific-hake/pacifichakemse documentation built on June 11, 2024, 4:07 a.m.