this.path

Get Executing Script's Path

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

Tests Vignettes

Available Snapshots

This version of this.path can be found in the following snapshots:

Dependencies

Imports/Depends/LinkingTo/Enhances (7)
  • R
  • box
  • knitr
  • plumber
  • shiny
  • targets
  • testthat
  • Suggests (3)
  • jsonlite
  • microbenchmark
  • rprojroot
  • Version History