Package: this.path 2.5.0.34

Iris Simmons

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

Authors:Iris Simmons

this.path_2.5.0.34.tar.gz
this.path_2.5.0.34.zip(r-4.5)this.path_2.5.0.34.zip(r-4.4)this.path_2.5.0.34.zip(r-4.3)
this.path_2.5.0.34.tgz(r-4.4-x86_64)this.path_2.5.0.34.tgz(r-4.4-arm64)this.path_2.5.0.34.tgz(r-4.3-x86_64)this.path_2.5.0.34.tgz(r-4.3-arm64)
this.path_2.5.0.34.tar.gz(r-4.5-noble)this.path_2.5.0.34.tar.gz(r-4.4-noble)
this.path_2.5.0.34.tgz(r-4.4-emscripten)this.path_2.5.0.34.tgz(r-4.3-emscripten)
this.path.pdf |this.path.html
this.path/json (API)
NEWS

# Install 'this.path' in R:
install.packages('this.path', repos = c('https://arcadeantics.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/arcadeantics/this.path/issues

On CRAN:

87 exports 39 stars 3.81 score 0 dependencies 3 dependents 276 scripts 1.6k downloads

Last updated 15 hours agofrom:3536d56d26. Checks:OK: 2 NOTE: 6 WARNING: 1. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 17 2024
R-4.5-win-x86_64WARNINGSep 17 2024
R-4.5-linux-x86_64OKSep 17 2024
R-4.4-win-x86_64NOTESep 17 2024
R-4.4-mac-x86_64NOTESep 17 2024
R-4.4-mac-aarch64NOTESep 17 2024
R-4.3-win-x86_64NOTESep 17 2024
R-4.3-mac-x86_64NOTESep 17 2024
R-4.3-mac-aarch64NOTESep 17 2024

Exports:asArgsbasename2check.dircheck.pathcheck.projdirname2env.direnv.hereenv.LINENOenv.pathenv.projextext<-FILEfileArgsfrom.shellgetinitwdhereiciinit.fileinitwdis.mainlast.conditionLINELINENOmake_fix_fileOS.typepath.functionspath.joinpath.splitpath.split.1path.unsplitprogArgsrel2env.dirrel2env.projrel2hererel2projrel2src.dirrel2src.projrel2sys.dirrel2sys.projrelpathremoveextreset.projset.env.pathset.gui.pathset.jupyter.pathset.src.pathset.sys.pathset.sys.path.functionset.sys.path.jupytershFILEsite.filesource.exprssplitextsrc.dirsrc.heresrc.LINENOsrc.pathsrc.projsys.dirsys.heresys.LINENOsys.pathsys.projSys.putenvsys.srcrefsys.whichesthis.dirthis.paththis.projthisPathNotExistsErrorthisPathNotFoundErrortry.env.pathtry.shFILEtry.src.pathtry.sys.pathtry.this.pathtryCatch2tryCatch3unset.sys.pathwith_init.filewith_script_pathwith_site.filewith_sys.pathwithArgswrap.source

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Get Script's Paththis.path-package
Manipulate File Pathsbasename2 dirname2
Check 'this.path()' is Functioning Correctlycheck.dir check.path check.proj
Functions That Enhance the Use of Other Packagesmake_fix_file with_script_path
File Extensionsext ext<- removeext splitext
Construct Path to File, Starting With Script's Directoryhere ici reset.proj this.proj
Line Number of Executing ExpressionLINENO
Detect the Operating System TypeOS.type
Constructs Path Functions Similar to 'this.path()'path.functions
Construct Path to Filepath.join
Split File Path Into Individual Componentspath.split path.split.1 path.unsplit
Make a Path Relative to Anotherrel2here rel2proj relpath
Declare GUI's Active Documentset.gui.path thisPathNotExistsError thisPathNotFoundError
Declare Executing 'Jupyter' Notebook's Filenameset.jupyter.path
Implement 'this.path()' For Arbitrary 'source()'-Like Functionsset.env.path set.src.path set.sys.path set.sys.path.function unset.sys.path with_sys.path wrap.source
Get 'FILE' Provided to R by a ShellshFILE
Files Related to Initialization of the R Sessioninit.file site.file with_init.file with_site.file
Determine Script's Filenamethis.dir this.path
Attempt to Determine Script's Filenametry.shFILE try.this.path