try.this.path {this.path} | R Documentation |
Attempt to Determine Script's Filename
Description
try.this.path()
attempts to return this.path()
,
returning this.path(original = TRUE)
if that fails, returning
NA_character_
if that fails as well.
Usage
try.this.path(contents = FALSE, local = FALSE, n = 0,
envir = parent.frame(n + 1),
matchThisEnv = getOption("topLevelEnvironment"),
srcfile = if (n) sys.parent(n) else 0)
try.shFILE()
Arguments
contents , local , n , envir , matchThisEnv , srcfile |
See
|
Details
This should NOT be used to construct file paths against the script's directory. This should exclusively be used for diagnostic messages / / warnings / / errors / / logging. The returned path may not exist, may be relative instead of absolute, or may be undefined.
Value
character string.
Examples
try.shFILE()
try.this.path()
try.this.path(contents = TRUE)
[Package this.path version 2.5.0 Index]