Finds the root directory of the current R project using various heuristics.
The function searches for markers like _resultcheck.yml (preferred),
resultcheck.yml (legacy), .Rproj files,
or a .git directory. When running inside a sandbox created by
setup_sandbox(), it will search from the original working directory.
Examples
with_example({
root <- find_root()
print(root)
})
#> [1] "/tmp/RtmpGfNOM5/resultcheck-example-19cc3ce21a1d"