Get Executing Script's Path
Overview
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()'.
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK, 1 FAILURE2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
- OK13 OK2026-05-02
Show 5 earlier changesHide 5 earlier changes
- ERROR11 OK, 1 ERROR2026-04-25
- OK14 OK2026-04-16
- WARNING9 OK, 4 NOTE, 1 WARNING2026-03-21
- NOTE13 OK, 1 NOTE2026-03-17
- OK14 OK2026-03-10
Documentation
- Help pages
- 31 (12 internal)includes a package overview page
- Examples that run
- 79%19 run in a plain check · 1 never run · 4 hold no code
- Exported functions with examples
- 85%
- Documented parameters
- 52%
- Return-value docs
- 85%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 2
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/arcadeantics/this.path on 2026-10-18.
Dependencies
Installing this.path adds no packages beyond those that come with R.
Code & Tests
Datasets
People & History
Maintainer since 0.1.0 (2020)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.8.0Latest
- 2.7.12025-11-07 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 2.7.0
- 2.6.02024-12-18 · diff ↗ ·
removed 5 exports
reset.this.proj, set.this.path.jupyter, inside.source, set.this.path, unset.this.pathadded 1 export
make_fix_funs - 2.5.02024-06-30 · diff ↗ ·
removed 5 exports
as.rel.path, as.relative.path, local.path, Sys.path, Sys.diradded 1 export
print.connection - RR 4.4.0 released · 2024-04-24
- 2.4.02024-02-16 · diff ↗ ·
added 9 exports
list.files, file.copy, Sys.setFileTime, unlink, ...elt, with_script_path, make_fix_file, thisPathNotFoundError, sys.whiches - 2.3.12023-12-11 · diff ↗
- 2.3.02023-12-02 · diff ↗ ·
removed 4 exports
normalized.shFILE, this.path2, this.dir2, this.dir3added 1 export
file.size - 2.2.02023-10-29 · diff ↗ ·
added 11 exports
withAutoprint, site.file, init.file, set.jupyter.path, set.gui.path, thisPathNotExistsError, sys.srcref, set.sys.path.function, with_sys.path, with_site.file, with_init.file - 2.1.02023-09-13 · diff ↗ ·
added 26 exports
.mapply, parse, anyNA, anyNA.data.frame, anyNA.numeric_version, anyNA.POSIXlt, isNamespaceLoaded, dir.exists, lengths, file.mtime, file.info, strrep, startsWith, endsWith, ...length, isTRUE, isFALSE, errorCondition, str2expression, str2lang, deparse1, bquote, gettext, gettextf, tryCatch3, last.condition - 2.0.02023-08-09 · diff ↗ ·
added 35 exports
sys.LINENO, env.LINENO, src.LINENO, LINE, path.functions, rel2sys.dir, rel2sys.proj, rel2env.dir, rel2env.proj, rel2src.dir, rel2src.proj, rel2proj, sys.proj, env.proj, src.proj, reset.proj, set.sys.path.jupyter, sys.path, sys.dir, env.path, env.dir, src.path, src.dir, sys.here, env.here, src.here, try.sys.path, try.env.path, try.src.path, FILE and 5 more - RR 4.3.0 released · 2023-04-21
- 1.4.02023-04-18 · diff ↗
Show 23 earlier eventsHide 23 earlier events
- 1.3.02023-04-09 · diff ↗ ·
added 11 exports
check.proj, path.split, path.split.1, path.unsplit, rel2here, reset.this.proj, set.this.path.jupyter, try.shFILE, try.this.path, local.path, unset.this.path - 1.2.0
- 1.1.02022-12-01 · diff ↗ ·
added 15 exports
relpath, progArgs, splitext, removeext, ext, ext<-, is.main, OS.type, LINENO, initwd, getinitwd, Sys.path, Sys.dir, wrap.source, inside.source - 1.0.12022-09-23 · diff ↗
- 1.0.0
- 0.11.0
- 0.8.02022-07-11 · diff ↗ ·
removed 27 exports
ArgumentParser, Commands, Missing, commandPrompt, commandQuote, shEncode, dedent, delayedAssign2, file.open, list.files2, dir2, normalizeAgainst, path.contract, pseudoglobalenv, python, R, Rcmd, Rscript, Rterm, has.ext, scan2, format4scan, setReadWriteArgsMethod, writeArgs, readArgs, Args, withArgs - 0.7.02022-04-24 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.6.0
- 0.5.1
- 0.5.02022-01-11 · diff ↗ ·
added 34 exports
ArgumentParser, Commands, Missing, check.path, check.dir, commandPrompt, commandQuote, shEncode, dedent, delayedAssign2, file.open, here, ici, list.files2, dir2, normalizeAgainst, path.contract, pseudoglobalenv, python, R, Rcmd, Rscript, Rterm, has.ext, scan2, format4scan, setReadWriteArgsMethod, writeArgs, readArgs, this.path2 and 4 more - RR 4.1.0 released · 2021-05-18
- 0.4.42021-03-21 · diff ↗
- 0.4.32021-03-18 · diff ↗
- 0.4.22021-03-17 · diff ↗
- 0.4.12021-03-16 · diff ↗
- 0.4.02021-03-15 · diff ↗
- 0.3.02021-03-04 · diff ↗
- 0.2.12020-12-17 · diff ↗
- 0.2.02020-12-03 · diff ↗
- 0.1.02020-11-11
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-11-11
- Total releases
- 32 / 6 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 2.15
- Download size
- 372 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("this.path")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.