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 29 Mar. 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
02/2702/2803/0103/0203/0303/0403/0503/0603/0703/0803/0903/1003/1103/1203/1303/1403/1503/1603/1703/1803/1903/2003/2103/2203/2303/2403/2503/2603/27Downloads for scriptloc12345678910TrendBars

Today's Hot Picks in Authors and Packages

landmix  
Landmark Prediction for Mixture Data
Non-parametric prediction of survival outcomes for mixture data that incorporates covariates and a l ...
Download / Learn more Package Citations See dependency  
gglgbtq  
Show Pride on 'ggplot2' Plots
Provides multiple palettes based on pride flags with tailored themes. ...
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  

23,842

R Packages

207,311

Dependencies

64,420

Author Associations

23,781

Publication Badges

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