Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I put Bookdown chapters in a subdirectory?

Tags:

r

bookdown

I can't figure put how to make a book with Rmd files in a subdirectory.

Here's my current directory structure:

  • myProject.Rproj
  • index.RMD
  • _bookdown.yml
  • chapters/
    • chapt1.RMD
    • chapt2.RMD
    • extraThatShouldNotBeIncluded.RMD

What should go in _bookdown.yml and in index.RMD to make this work?

like image 874
sharoz Avatar asked Jul 07 '17 17:07

sharoz


1 Answers

It turns out that you just have to specify the directory of each RMD in _bookdown.yml:

rmd_files: ["index.Rmd", "chapters/chapt1.RMD", "chapters/chapt2.RMD"]
like image 189
sharoz Avatar answered Nov 14 '22 07:11

sharoz