
Check if code is being run directly or from within a function
Source:R/is_run_directly.R
is_run_directly.Rd
This function determines whether code is being executed directly in the global environment or from within a function call. It's particularly useful for development and debugging purposes, allowing functions to behave differently when run directly versus when called as part of a larger analysis plan.