In any larger project that needs subdirectories, it is important to have a consistent way to locate files. Paths relative to the project root make sense, but in R, the current working directory cannot be always assumed to be the project root (think vignettes and tests).
# Find the root of an R package, identified by a DESCRIPTION file rprojroot::find_root("DESCRIPTION") ##  "/path/to/your/package/root"
This works no matter what your current working directory is, as long as it is somewhere below the project root. Promised.
Largely inspired by the post Stop the working directory insanity by Jennifer Bryan, and of course by Git.