Chapter 3
2022-02-21
1 Preface
This is an attempt to use {targets} with {bookdown} to track the status of chapter and not re-run chapters each time the book needs to be rebuilt.
1.1 To run the book
- Install the {targets} package and {bookdown}
- Type
tar_make()at the command line. - Look in the
_bookfolder for theindex.htmlfile and open that.
1.2 To add chapters
- The chapters are in the
chaptersfolder. Add an Rmd there. - Open the
_targets.Rfile and add something like target_factory(chap2)but replacechap2` with your file name. chapters/chap3shows and example where the chapter uses targets markdown to create a chapter specific pipeline. To run, setchapters/chap3as the working directory, openchap3.Rmdand knit. Then