R/is_run_directly.R

Defines functions is_run_directly

Documented in is_run_directly

#' Is this code run directly?
#'
#' This function determines if it is being called from within a function
#' or if it is being run directly
#' @export
is_run_directly <- function() {
  sys.nframe() == 1
}

Try the plnr package in your browser

Any scripts or data that you put into this service are public.

plnr documentation built on Nov. 23, 2022, 5:06 p.m.