1

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,229
  • 11
  • 59
  • 107

1 Answers1

4

This should work:

```{r setup, include=FALSE}
knitr::opts_knit$set(root.dir = getwd())
```
P. Denelle
  • 740
  • 9
  • 20