Other packages > Find by keyword >

scriptloc  

Get the Location of the R Script that is Being Sourced/Executed
View on CRAN: Click here


Download and install scriptloc package within the R console
Install from CRAN:
install.packages("scriptloc")

Install from Github:
library("remotes")
install_github("cran/scriptloc")

Install by package version:
library("remotes")
install_version("scriptloc", "1.0.0")



Attach the package and use:
library("scriptloc")
Maintained by
Naren Chandran Sakthivel
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2023-08-17
Latest Update: 2023-08-17
Description:
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.
How to cite:
Naren Chandran Sakthivel (2023). scriptloc: Get the Location of the R Script that is Being Sourced/Executed. R package version 1.0.0, https://cran.r-project.org/web/packages/scriptloc. Accessed 06 Jun. 2026.
Previous versions and publish date:
No previous versions
Other packages that cited scriptloc R package
View scriptloc citation profile
Other R packages that scriptloc depends, imports, suggests or enhances
Complete documentation for scriptloc
Functions, R codes and Examples using the scriptloc R package
Some associated functions: script_dir_get . script_file_get . scriptloc . src_file_get . 
Some associated R codes: scriptloc.R .  Full scriptloc package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

worrrd  
Generate Wordsearch and Crossword Puzzles
Generate wordsearch and crossword puzzles using custom lists of words (and clues).Make them easy or ...
Download / Learn more Package Citations See dependency  
rwavelet  
Wavelet Analysis
Perform wavelet analysis (orthogonal,translation invariant, tensorial, 1-2-3d transforms, thresholdi ...
Download / Learn more Package Citations See dependency  
BALLI  
Expression RNA-Seq Data Analysis Based on Linear Mixed Model
Analysis of gene expression RNA-seq data using Bartlett-Adjusted Likelihood-based LInear model (BALL ...
Download / Learn more Package Citations See dependency  
IAPWS95  
Thermophysical Properties of Water and Steam
An implementation of the International Association for the Properties of Water (IAPWS) Formulation ...
Download / Learn more Package Citations See dependency  
odbc  
Connect to ODBC Compatible Databases (using the DBI Interface)
A DBI-compatible interface to ODBC databases. ...
Download / Learn more Package Citations See dependency  
r2resize  
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizable or expandable contai ...
Download / Learn more Package Citations See dependency  

27,268

R Packages

233,548

Dependencies

72,820

Author Associations

27,205

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA