this.path (version 0.5.1)
Get Executing Script's Path, from 'RStudio', 'Rgui', 'Rscript'
(Shells Including Windows Command-Line / / Unix Terminal), and
'source'
Description
Determine the full path of the executing script. Works when
running a line or selection from a script in 'RStudio' and 'Rgui', when
using 'source', 'sys.source', 'debugSource' in 'RStudio', and
'testthat::source_file', and when running R from a shell.