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:
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.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')) |
This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.
Last updated 1 years agofrom:92b3354615. Checks:OK: 3 NOTE: 4. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 11 2024 |
R-4.5-win | NOTE | Oct 11 2024 |
R-4.5-linux | NOTE | Oct 11 2024 |
R-4.4-win | NOTE | Oct 11 2024 |
R-4.4-mac | NOTE | Oct 11 2024 |
R-4.3-win | OK | Oct 11 2024 |
R-4.3-mac | OK | Oct 11 2024 |
Exports:script_dir_getscriptloc
Dependencies:
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Return directory where the script exists | script_dir_get |
Get location of script that was executed through Rscript | script_file_get |
Get location of script in a fashion analagous to $BASH_SOURCE[0] | scriptloc |
Get location of script that was loaded through the source() function | src_file_get |