Most use_*()
functions act on the active project. If it is unset,
usethis uses rprojroot to find the
project root of the current working directory. It establishes the project
root by looking for a .here
file, an RStudio Project, a package
DESCRIPTION
, Git infrastructure, a remake.yml
file, or a .projectile
file. It then stores the active project for use for the remainder of the
session. If needed, you can manually override by running proj_set()
.
In general, user scripts should not call usethis::proj_get()
or usethis::proj_set()
. They are internal functions that are exported for
occasional interactive use. If you need to detect a project
programmatically in your code, you should probably be using
rprojroot or its simpler companion,
here, directly.