this.path: Get Executing Script's Path

Determine the path of the executing script. Compatible with a few popular GUIs: 'Rgui', 'RStudio', 'VSCode', 'Jupyter', 'Emacs', and 'Rscript' (shell). Compatible with several functions and packages: 'source()', 'sys.source()', 'debugSource()' in 'RStudio', 'compiler::loadcmp()', 'box::use()', 'knitr::knit()', 'plumber::plumb()', 'shiny::runApp()', 'package:targets', and 'testthat::source_file()'.

Version: 2.3.0
Suggests: utils, microbenchmark
Enhances: compiler, box, IRkernel, jsonlite, knitr, plumber, rprojroot, rstudioapi, shiny, targets, testthat
Published: 2023-12-02
Author: Iris Simmons
Maintainer: Iris Simmons <ikwsimmo at>
License: MIT + file LICENSE
NeedsCompilation: yes
Materials: README NEWS
CRAN checks: this.path results


Reference manual: this.path.pdf


Package source: this.path_2.3.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): this.path_2.3.0.tgz, r-oldrel (arm64): this.path_2.3.0.tgz, r-release (x86_64): this.path_2.3.0.tgz, r-oldrel (x86_64): this.path_2.1.0.tgz
Old sources: this.path archive

Reverse dependencies:

Reverse depends: ptspotter
Reverse imports: neptune


Please use the canonical form to link to this page.