How to integrate R ProjectTemplate into R Markdown

301 views Asked by At

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

1

There are 1 answers

0
paulusm On

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