Bookdown books on the web: downloading and converting to pdf

I recently made a pre-release order of Hadley’s Advanced R 2nd ed. I have found that I absorb information better from paper copy than froma computer screen. There is something about the physicality of it, the spacial organization of pages and the way you use your hands to move through it that seem to help me hang on to material better. I know this makes me a fossil, but still, it’s true.

So I find that I am really impatient to hold the actual book in my hands, or at least the chapters that seem most changed from the first edition. So here is my question: When I bought the first edition, I also found some instructions for converting the online edition into a PDF, and I succeeded in doing so with only a few glitches. Unfortunately, the instructions I had relied on the existence of a downloadable zip file containing, if I recall correctly, the github replication. I assume that replication should be easier from the bookdown version, and I have found instructions for uploading and editing files on (where the web version of AR2d is hosted, but these seem to assume that you only want, or can only get, access to the books you yourself have uploaded. At least, that was all I could find.

Can anyone tell me if there is a straightforward way of grabbing bookdown books that are published on the web with an open-source license and converting them to other formats?

Not sure to understand what you want to do but

here is the online version of the book

The licence for the book is detailed here Welcome | Advanced R
it is a image CC BY-NC-SA 4.0 Deed | Attribution-NonCommercial-ShareAlike 4.0 International | Creative Commons

This work, as a whole, is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The code contained in this book is simultaneously available under the MIT license; this means that you are free to use it in your own packages, as long as you cite the source.

You can find the code on GIthub

What you can do with CC books is clone the github repo (see what @cderv linked to) and then you can build the book locally as a pdf for yourself with bookdown.

rmarkdown::render_site(output_format = 'bookdown::pdf_book', encoding = 'UTF-8')

This requires you to have things like Git, MikTex, and GnuWin32 if you're on Windows, as well as every package used in the book. So it's not exactly super-straightforward, but it's what works.

1 Like

Thanks, cderv! I found that github site, but I thought it was the one for the old book. Closer examination shows that it is the new one. All that talk about arrows, y'know.

Thanks, Hlynur!
Have you seen a good how-to or tutorial on this? Would Yihui's bookdown book be the best place to start? It would be nice to find something shorter, if such exists

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.