sys.proj(), env.proj(), src.proj(), and
this.proj() construct paths to files starting with the project's root.
reset.proj() will reset the paths cached by these functions. This can
be useful if you created a new project in your R session that you would like
to be detected without the need to restart the R session.
sys.proj(..., local = FALSE)
env.proj(..., n = 0, envir = parent.frame(n + 1),
matchThisEnv = getOption("topLevelEnvironment"))
src.proj(..., n = 0,
srcfile = if (n) sys.parent(n) else 0)this.proj(..., local = FALSE, n = 0,
envir = parent.frame(n + 1),
matchThisEnv = getOption("topLevelEnvironment"),
srcfile = if (n) sys.parent(n) else 0)
reset.proj()
A character vector of the arguments concatenated term-by-term, starting with the project's root.
further arguments passed to path.join().
See ?sys.path().
See ?this.path().
Unlike here::here(), these functions support sub-projects and multiple
projects in use at once, and will choose which project root is appropriate
based on sys.dir(), env.dir(),
src.dir(), or this.dir(). Additionally, it is
independent of working directory, whereas here::here() relies on the
working directory being set within the project's directory when the package
is loaded. Arguably, this makes it better than here::here().