rprojroot
Finding files in project subdirectories
The rprojroot package helps R developers access files relative to a project root directory, eliminating dependency on the current working directory. It identifies project roots using strict criteria (like detecting a DESCRIPTION file for R packages) and provides functions to construct file paths from that root.
The package solves the problem of fragile code that breaks when run from different directories within a project. It works by searching up the directory tree from your current location to find the project root based on customizable criteria, then constructs paths relative to that root. This makes file paths consistent regardless of where your script is executed from, and it serves as the foundation for the higher-level here package.


