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 07 Nov. 2024.
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
Get rewarded with contribution points by helping add
Reviews / comments / questions /suggestions ↴↴↴

Today's Hot Picks in Authors and Packages

robregcc  
Robust Regression with Compositional Covariates
We implement the algorithm estimating the parameters of the robust regression model with composition ...
Download / Learn more Package Citations See dependency  
nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
bacondecomp  
Goodman-Bacon Decomposition
Decomposition for differences-in-differences with variation in treatment timing from Goodman-Bacon ...
Download / Learn more Package Citations See dependency  
con2aqi  
Calculate the AQI from Pollutant Concentration
To calculate the AQI (Air Quality Index) from pollutant concentration data. O3, PM2.5, PM10, CO, SO ...
Download / Learn more Package Citations See dependency  

23,092

R Packages

198,677

Dependencies

62,675

Author Associations

23,089

Publication Badges

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