R/get_source_file.R
get_source_file.RdFor interactive sessions: Calls
getSourceEditorContext to obtain the source
context. The source editor context refers to the active file opened in
RStudio.
For non-interactive sessions: Parses commandArgs to
obtain the name of the script being executed.
get_source_file()returns the path of the source editor or the script being executed.