Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.Rmd

README.Rmd

---
output:
  md_document:
    variant: markdown_github
knit: (function(inputFile, encoding) {
      rmarkdown::render(
        inputFile, encoding=encoding,
        output_file=rprojroot::find_root_file("README.md", criterion = "DESCRIPTION")) })
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
```

# [rprojroot](https://r-lib.github.io/rprojroot)

[![Travis-CI Build Status](https://travis-ci.org/r-lib/rprojroot.svg?branch=master)](https://travis-ci.org/r-lib/rprojroot) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/r-lib/rprojroot?branch=master&svg=true)](https://ci.appveyor.com/project/r-lib/rprojroot) [![codecov.io](https://codecov.io/github/r-lib/rprojroot/coverage.svg?branch=master)](https://codecov.io/github/r-lib/rprojroot?branch=master) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rprojroot)](https://cran.r-project.org/package=rprojroot)

This package helps accessing files relative to a *project root* to [stop the working directory insanity](https://gist.github.com/jennybc/362f52446fe1ebc4c49f).

## Example

The source for this text is in the [`readme` subdirectory](https://github.com/r-lib/rprojroot/tree/master/readme):

```{r}
basename(getwd())
```

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

```{r}
dir(rprojroot::find_root("DESCRIPTION"))
```


## Installation and further reading

Install from GitHub:

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

See the [documentation](http://r-lib.github.io/rprojroot/articles/rprojroot.html) for more detail.
You can’t perform that action at this time.