Package: scriptloc 1.0.0

scriptloc: Get the Location of the R Script that is Being Sourced/Executed

Provides functions to retrieve the location of R scripts loaded through the source() function or run from the command line using the Rscript command. This functionality is analogous to the Bash shell's ${BASH_SOURCE[0]}. Users can first set the project root's path relative to the script path and then all subsequent paths relative to the root. This system ensures that all paths lead to the same location regardless of where any script is executed/loaded from without resorting to the use of setwd() at the top of the scripts.

Authors:Naren Chandran Sakthivel [aut, cre]

scriptloc_1.0.0.tar.gz
scriptloc_1.0.0.zip(r-4.5)scriptloc_1.0.0.zip(r-4.4)scriptloc_1.0.0.zip(r-4.3)
scriptloc_1.0.0.tgz(r-4.5-any)scriptloc_1.0.0.tgz(r-4.4-any)scriptloc_1.0.0.tgz(r-4.3-any)
scriptloc_1.0.0.tar.gz(r-4.5-noble)scriptloc_1.0.0.tar.gz(r-4.4-noble)
scriptloc_1.0.0.tgz(r-4.4-emscripten)scriptloc_1.0.0.tgz(r-4.3-emscripten)
scriptloc.pdf |scriptloc.html
scriptloc/json (API)

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

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.70 score 6 scripts 141 downloads 2 exports 0 dependencies

Last updated 2 years agofrom:92b3354615. Checks:3 OK, 5 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 08 2025
R-4.5-winNOTEFeb 08 2025
R-4.5-macNOTEFeb 08 2025
R-4.5-linuxNOTEFeb 08 2025
R-4.4-winNOTEFeb 08 2025
R-4.4-macNOTEFeb 08 2025
R-4.3-winOKFeb 08 2025
R-4.3-macOKFeb 08 2025

Exports:script_dir_getscriptloc

Dependencies:

scriptloc

Rendered fromscriptloc.Rmdusingknitr::rmarkdownon Feb 08 2025.

Last update: 2023-08-17
Started: 2023-08-17