0

I've been reading everywhere about the need to organize your R projects and also to use Rmarkdown. I see an incoherence I can't solve. Suppose I set for the following standard organization:

Project

  • data
  • raw-data
  • code
  • docs
  • out
  • reports

and also home of setwd().

Now I want to use Rmarkdown with my main project file called My_project.Rmd

I create it at the root project level, then I get at every knit rendition 2 directories created My_project_cache and My_project_files on to of every .hml file rendered that conflicts with the above structure.

This is very impractical.

I tried setting the options of output to avoid this, per this tip, but it fails on the cache directory, and I did not succeeded in setting Knit options to bypass it. And no-one seems to be bothered by this question making the solution look like a dead-end.

The other solution is to put My_project.Rmd directly in reports/ but it feels a little awkward and on top of that it breaks the above project structure by imposing ../ paths everywhere.

The third solution is to work with Rmd format, only at the end of a project, but this seems a little defeating the purpose of documenting everything neatly in the first place.

There may be a 4th solution using R Notebook feature, but it works until you decide to try to finalize your "final" document , which of course is never really final.

What am I missing here ?

For reference, I'm using RStudio on a Mac.

Hugues
  • 164
  • 1
  • 12

0 Answers0