Till Opel
Till Opel

Reputation: 21

How to integrate R ProjectTemplate into R Markdown

I have a complete R ProjectTemplate, which has a complex folder structure and i want to transfer this whole Project into an R Script or an R Markdown for a better understanding (writing a research paper about it).

Is it possible to transform a R ProjectTemplate into an R Markdown/R Script?

I am thankful for every tip and hope that there is an option for that. :)

Kind regards, Till

Upvotes: 2

Views: 318

Answers (1)

paulusm
paulusm

Reputation: 806

Just been doing the same thing, and found https://www.r-bloggers.com/customising-projecttemplate-in-r/ useful

So I've got this at the top of my Rmd file, which is saved in the reports folder

`r knitr::opts_knit$set(root.dir='..')`

```{r}
library(ProjectTemplate); load.project()
```

Also have set load_libraries: TRUE in the ProjectTemplate config file

Upvotes: 3

Related Questions