rscript_filename() returns the file name of the calling script as it was
passed to Rscript or littler. OptionParser() uses it as the
default program name.
Usage
rscript_filename(quote = NA, type = c("sh", "csh", "cmd", "cmd2"))Arguments
- quote
Whether to quote the file name for a shell. If
TRUEalways quote it withbase::shQuote(), ifNA(the default) only quote it if needed withshell_quote(), and ifFALSEnever quote it.- type
The type of shell quoting passed on to
base::shQuote()orshell_quote(). Seeshell_quote()for the default.
Value
A string with the file name of the calling script.
If not found (e.g. you are in an interactive session) returns
NA_character_.