Learn R Programming

this.path (version 2.7.0)

make_fix_funs: Constructs Path Functions Similar to 'this.path()'

Description

make_fix_funs() accepts a pathname and constructs a set of path-related functions, similar to this.path() and associated.

Usage

make_fix_funs(file, delayed = FALSE, local = FALSE, n = 0,
              envir = parent.frame(n + 1),
              matchThisEnv = getOption("topLevelEnvironment"),
              srcfile = if (n) sys.parent(n) else 0)

## alias for 'make_fix_funs' path.functions(file, delayed = FALSE, local = FALSE, n = 0, envir = parent.frame(n + 1), matchThisEnv = getOption("topLevelEnvironment"), srcfile = if (n) sys.parent(n) else 0)

Value

An environment with at least the following bindings:

this.path

Function with formals (original = FALSE, contents = FALSE) which returns the normalized file path, the original file path, or the contents of the file.

this.dir

Function with no formals which returns the directory of the normalized file path.

here, ici

Function with formals (..., .. = 0) which constructs file paths, starting with the file's directory.

this.proj

Function with formals (..., .. = 0) which constructs file paths, starting with the project root.

rel2here, rel2proj

Functions with formals (path) which turn absolute paths into relative paths, against the file's directory / / project root.

LINENO

Function with no formals which returns the line number of the executing expression in file.

Arguments

file

a character string giving the pathname of the file or URL.

delayed

TRUE or FALSE; should the normalizing of file be delayed?

local, n, envir, matchThisEnv, srcfile

See ?this.path().