bookdown: Authoring Books and Technical Documents with R Markdown
Pedro Miguel Valero Mora · Journal of Statistical Software · 2018
Are you surprised to find a review of a book on software for formatting books in the Journal of Statistical Software?Well, do not be: there are strong arguments that make the bookdown package worth to be known by people who analyze data and then write books, reports, web sites, or e-books about their results.So, the bookdown package extends the literate programming facilities of knitr and the text-formatting capabilities of R Markdown to longer documents such as books or multipage sites by including automatic reference figuring, separated files for chapters or html pages, and easy export to L A T E X book documents.After using it for a few months, I can say it is a very good option, if not the best, for books or academical writing.However, although the bookdown package works very well once you master it, there is a downside: in order to take advantage of its capabilities you have to get acquainted also with other packages, programming languages, formats, syntax, commands, environments, nomenclature, and else.As in the Bach quote: "It's easy to play any musical instrument: all you have to do is hit the right keys at the right time and the instrument will play itself".The bookdown package will pay off very quickly if you have invested a fair amount of time in the past learning the technologies that it integrates, but if you have not, then the reward will take longer and you may even wonder if it is worth of the effort.And, if you are not willing to acquire the ABCs of these technologies, then you might probably be better off sticking to alternatives such as, cough, the word processor that we all love to hate.The first thing you have to know to take advantage of bookdown is, of course, R. If you are not familiar with it, and not interested in learning it, I think you can skip bookdown safely.But if you are not enticed by the currently most exciting statistical system it can be only because you are not interested in data analysis at all, and, in that case, why are you reading book reviews published in the Journal of Statistical Software?The second thing you need to know is knitr, one of the implementations in R of literate programming, a programming paradigm in which natural language explains the logic of code that is interspersed with it, with the particularity that the code can be extracted automatically and executed as a normal program later on.This way, programs and documentation are not separated and programmers can write them following the logic of their thoughts.Literate