script {script} | R Documentation |
Identifies script name in a variety of contexts, e.g. interactively or when script is sourced. Attempts to support RStudio environment.
script()
character: path to current file, or empty string if indeterminate
script()