Find the Project Root Directory
find_project_root.Rd
Recursively walks up the directory tree from the current working directory
to locate a project root, identified by a given target file or file pattern.
Common use cases include locating files like renv.lock
, pyproject.toml
, or
any .Rproj
file.
Value
A list with the following components:
- success
Logical indicating whether the target was found.
- project.root
The path to the directory where the target was found, or
NA
if not found.- original.dir
The directory where the search started.
- user.root
The user's home directory (search stops here).
- target
The search target used.
- iter
The number of directory levels ascended during the search.