Compiling a thesisdown directory in ess
The thesisdown package for R compiles a nice pdf. Chapters are stored as separate .Rmd files. So, when typing away in ess how do you compile the whole thing?
I made an R script that can be called from bash.
Then I wrote a defun - define function, in emacs that calls this script.
And finally, a keybinding to call it. Now I can be working in 03-chap3.Rmd and quickly compile the project, which of course will auto-refresh if you use Skim instead of Preview as your pdf viewer.
Sometimes you are just working in a single file in ess, without the complications of multiple chapters and a separate Index.Rmd. But, I haven’t found the best knitr function in ess or polymode, so I have a function to compile a single r-markdown notebook, just like the knit button in RStudio.
I’m still not very good at writing keybindings for emacs. I’m sure it would be better to make this in the polymode keymap.