scriptName: Returns the file name of the Rscript being executed

Description Usage Details Value Author(s) See Also Examples

View source: R/scriptName.R

Description

Get the file name of the Rscript that is currently being executed. The function is mainly called by stand-alone Rscripts.

Usage

1

Details

The name is determined by the --file/-f option in the command line.

When the R session was not initiated by a Rscript (i.e. there is no --file or -f option in the command line), NULL is returned.

Note that the function supports calling Rscript via --file or -f with R. This applies to cases where a Rscript, marked as executable, and is called from the command line.

Value

A character string containing the file name of the Rscript.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

See Also

commandArgs and getArg

Examples

1
## Not run: scriptName()

bedapub/ribiosArg documentation built on Nov. 4, 2021, 1:12 p.m.