Skip to content

this.path

2.8.0Package record

Get Executing Script's Path

3packages dependsuggested by 2
40.1Kdownloads / year
33.9%test coverage
13/13flavors OK

Overview

About

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

CRAN checks
13OK
Slowest check: 2.9 min · r-devel-windows-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 2.8.0
READMEYes · 1,446 wordsVignettesNoNEWSYes · 33% structuredCitation fileNoWebsitenot declared in DESCRIPTION
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

40.1K
CRAN downloads in the past year
Rank #1,770 · ~110/day · ~3.3K/mo
Daily download trend is not available in this view yet.
4K30 days
11.6K90 days
40.1K1 year
Compare downloads with other packages →
Also on858 r2u5 autocran8K conda_forge

Repository

69Stars
2Forks
7Open issues
0Open PRs
0Releases
702Commits
3Commit identities
rpackage
702 commits · Last activity 2026-10-18 · +1.5% stars, 30d · Default branch at 2.8.0.68, ahead of CRAN 2.8.0 (checked 2026-10-18)
Responsiveness
How these are sampled
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

2025-10-15 · 602026-10-09 · 69
PracticesBeta

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.

Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing this.path adds no packages beyond those that come with R.

Depends (1)
R >= 2.15
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
3direct
0indirect
Imports 3
Suggested by 2
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer · added in 1.3.0

Maintainer since 0.1.0 (2020)

Listed in earlier versions (1)
Andrew Simmons
no longer listed · 0.1.0 to 1.2.0
Releases (32)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2.8.0Latest
    record
    2026-04-10 · current release · diff ↗
  • 2.7.1
    record
    2025-11-07 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 2.7.0
    record
    2025-04-10 · diff ↗ ·
    removed 2 exports
    set.sys.path.jupyter, fileArgs
  • 2.6.0
    record
    2024-12-18 · diff ↗ ·
    removed 5 exports
    reset.this.proj, set.this.path.jupyter, inside.source, set.this.path, unset.this.path
    added 1 export
    make_fix_funs
  • 2.5.0
    record
    2024-06-30 · diff ↗ ·
    removed 5 exports
    as.rel.path, as.relative.path, local.path, Sys.path, Sys.dir
    added 1 export
    print.connection
  • R
    R 4.4.0 released · 2024-04-24
  • 2.4.0
    record
    2024-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.1
    record
    2023-12-11 · diff ↗
  • 2.3.0
    record
    2023-12-02 · diff ↗ ·
    removed 4 exports
    normalized.shFILE, this.path2, this.dir2, this.dir3
    added 1 export
    file.size
  • 2.2.0
    record
    2023-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.0
    record
    2023-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.0
    record
    2023-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
  • R
    R 4.3.0 released · 2023-04-21
  • 1.4.0
    record
    2023-04-18 · diff ↗
Show 23 earlier eventsHide 23 earlier events
  • 1.3.0
    record
    2023-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
    record
    2023-01-16 · diff ↗ ·
    added 2 exports
    Sys.putenv, set.this.path
  • 1.1.0
    record
    2022-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.1
    record
    2022-09-23 · diff ↗
  • 1.0.0
    record
    2022-09-22 · diff ↗ ·
    added 3 exports
    basename2, dirname2, path.join
  • 0.11.0
    record
    2022-09-03 · diff ↗ ·
    added 6 exports
    asArgs, from.shell, fileArgs, withArgs, this.proj, tryCatch2
  • 0.8.0
    record
    2022-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.0
    record
    2022-04-24 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.6.0
    record
    2022-04-21 · diff ↗ ·
    added 2 exports
    shFILE, normalized.shFILE
  • 0.5.1
    record
    2022-03-12 · diff ↗ ·
    added 2 exports
    as.relative.path, as.rel.path
  • 0.5.0
    record
    2022-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
  • R
    R 4.1.0 released · 2021-05-18
  • 0.4.4
    record
    2021-03-21 · diff ↗
  • 0.4.3
    record
    2021-03-18 · diff ↗
  • 0.4.2
    record
    2021-03-17 · diff ↗
  • 0.4.1
    record
    2021-03-16 · diff ↗
  • 0.4.0
    record
    2021-03-15 · diff ↗
  • 0.3.0
    record
    2021-03-04 · diff ↗
  • 0.2.1
    record
    2020-12-17 · diff ↗
  • 0.2.0
    record
    2020-12-03 · diff ↗
  • 0.1.0
    record
    2020-11-11
  • R
    R 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")
Simmons, I. (2026). this.path: Get Executing Script's Path (Version 2.8.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for this.path version 2.8.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy