Learn R Programming

funr (version 0.3.2)

sys.script: Get path of current script

Description

Get path of current script

Usage

sys.script()

Arguments

Source

http://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script

Examples

Run this code
## Not run: 
# ## cat foo.R
# ## library(funr);sys.script()
# 
# ## source("foo.R")
# 
# ## Rscript foo.R
# 
# ## End(Not run)

Run the code above in your browser using DataLab