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]
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 19 Apr. 2025.
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
03/2003/2103/2203/2303/2403/2503/2603/2703/2803/2903/3003/3104/0104/0204/0304/0404/0504/0604/0704/0804/0904/1004/1104/1204/1304/1404/1504/1604/17Downloads for scriptloc024681012141618TrendBars

Today's Hot Picks in Authors and Packages

PCGSE  
Principal Component Gene Set Enrichment
Contains logic for computing the statistical association of variable groups, i.e., gene sets, with r ...
Download / Learn more Package Citations See dependency  
quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
SDT  
Self-Determination Theory Measures
Functions for self-determination motivation theory (SDT) to compute measures of motivation internal ...
Download / Learn more Package Citations See dependency  
MScombine  
Combine Data from Positive and Negative Ionization Mode Finding Common Entities
Find common entities detected in both positive and negative ionization mode, delete this entity in ...
Download / Learn more Package Citations See dependency  
arsenal  
An Arsenal of 'R' Functions for Large-Scale Statistical Summaries
An Arsenal of 'R' functions for large-scale statistical summaries, which are streamlined to work wi ...
Download / Learn more Package Citations See dependency  
signibox  
Statistical Significance Marks on Boxplots
Add significance marks to any R Boxplot, including a given significance niveau. ...
Download / Learn more Package Citations See dependency  

24,012

R Packages

207,311

Dependencies

65,069

Author Associations

24,013

Publication Badges

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