The project root is established with a call to here::
i_am()
.
Although not recommended, it can be changed by calling here::i_am()
again.
In the absence of such a call (e.g. for a new project),
starting with the current working directory during package load time,
the directory hierarchy is walked upwards
until a directory with at least one of the following conditions is found:
contains a file .here
contains a file matching [.]Rproj$
with contents matching ^Version:
in the first line
contains a file DESCRIPTION
with contents matching ^Package:
contains a file remake.yml
contains a file .projectile
contains a directory .git
contains a file .git
with contents matching ^gitdir:
contains a directory .svn
In either case, here()
appends its arguments as path components
to the root directory.