Crandore Hub

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()'.

Versions across snapshots

VersionRepositoryFileSize
2.7.1 2026-04-09 windows/windows R-4.5 this.path_2.7.1.zip 496.9 KiB

Dependencies (latest)

Enhances

Suggests