View source: R/find_project_root.R
find_project_root | R Documentation |
This function recursively searches for the project root, defined as the directory containing an .Rproj file. It starts in the current directory and moves up the directory tree until it either finds an .Rproj file or reaches a directory with no parent.
find_project_root(setwd = TRUE)
setwd |
Logical. change the working directory to project root? Defaults to TRUE. |
The directory path containing an .Rproj file. Throws an error if no .Rproj file is found in the directory tree above the current directory.
Be careful when running this function, as it could end up searching a large portion of your file system if no .Rproj file is found.
## Not run:
find_project_root()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.