Skip to content
master
Go to file
Code
This branch is even with r-lib:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
API
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

rprojroot

Travis-CI Build Status AppVeyor Build Status codecov.io CRAN_Status_Badge

This package helps accessing files relative to a project root to stop the working directory insanity.

Example

The source for this text is in the readme subdirectory:

basename(getwd())
#> [1] "readme"

How do we access the package root? In a robust fashion? Easily:

dir(rprojroot::find_root("DESCRIPTION"))
#>  [1] "_pkgdown.yml"     "API"              "appveyor.yml"    
#>  [4] "cran-comments.md" "DESCRIPTION"      "docs"            
#>  [7] "inst"             "Makefile"         "man"             
#> [10] "NAMESPACE"        "NEWS.md"          "R"               
#> [13] "readme"           "README.md"        "revdep"          
#> [16] "rprojroot.Rproj"  "tests"            "tic.R"           
#> [19] "vignettes"

Installation and further reading

Install from GitHub:

devtools::install_github("r-lib/rprojroot")

See the documentation for more detail.

About

Finding files in project subdirectories

Resources

Packages

No packages published
You can’t perform that action at this time.