this.path-package {this.path} | R Documentation |
Determine the full path of the executing script. Works when running a line or selection from a script in 'RStudio', 'Rgui', and 'VSCode', when using 'source', 'sys.source', 'debugSource' in 'RStudio', and 'testthat::source_file', and when running from a shell.
The three most important functions from this package are this.path
,
this.dir
, and here
.
this.path()
returns the
normalized
path of the executing script.
this.dir()
returns the
normalized
path of the directory in which the
executing script is located.
here()
constructs file paths relative to the executing script's
directory.
This package started from a stack overflow posting, found at:
https://stackoverflow.com/questions/1815606/determine-path-of-the-executing-script
If you like this package, please consider upvoting my answer so that more
people will see it! If you have an issue with this package, please use
utils::bug.report(package = "this.path")
to
report your issue.
Andrew Simmons
Maintainer: Andrew Simmons <akwsimmo@gmail.com>
The main functions from this.path: this.path
,
this.dir
, here
Check this.path()
is functioning correctly: check.path
,
check.dir
Extract FILE from command line arguments: shFILE
,
normalized.shFILE
source
, sys.source
, debugSource
,
testthat::source_file