2

I'm on windows 10 , RStudio 1.0.136 , R 3.3.1

I'm creating a Rmd file and want to set the location of the Rmd file as the working directory.

I looked at the related questions here and here - but couldn't find a good solution yet.

user3206440
  • 4,749
  • 15
  • 75
  • 132

1 Answers1

5

This should work:

```{r setup, include=FALSE}
knitr::opts_knit$set(root.dir = getwd())
```
P. Denelle
  • 790
  • 10
  • 24