Get path of current script

Share:

Description

Get path of current script

Usage

1

Source

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
## cat foo.R
## library(funr);sys.script()

## source("foo.R")

## Rscript foo.R


## End(Not run)