Announcing pagedreport

tldr: Thomas Vroylandt and I have developed a package called pagedreport to help you make beautiful PDF reports from RMarkdown. Full documentation is available here.

In a recent training, I showed the group I was working with various options for knitting RMarkdown documents. When I got to PDF, I showed the default output. One participant said, “oh yeah, I recognize that from math papers I read in undergrad.”

The bare bones look of the default PDF export is so recognizable and so … boring.

Of course, there are other formats you can knit to from RMarkdown, HTML and Word being the other two main ones. There are many packages to make nice-looking HTML reports, including distill, prettydoc, and rmdformats. But HTML has limitations, especially in contexts where making printable versions is necessary. And if you’re knitting to Word, you can use reference documents to make your reports match your branding.

Even PDF documents knitted from RMarkdown can be customized. Unfortunately, customizations require knowledge of LaTeX, which I personally don’t know, but have read enough about to know I don’t want to learn it.

Recently, Yihui Xie and Romain Lesur have developed the pagedown package. Described as “a less traveled road to PDF,” this package relies on HTML, CSS, and the JavaScript library paged.js to create PDF documents. Because I have some experience with HTML and CSS, I’ve been able, working with pagedown wizard Thomas Vroylandt, to use this package to make nicely-formatted PDF reports.

Having come to love this package, I’ve wanted to share its benefits with others. In a recent R for the Rest of Us office hours session, I showed people how to make a simple custom pagedown template (this starts at 37:28).

Watch the video, though, and you’ll see that even developing a simple pagedown template is complicated. Unless you’ve got decent HTML and CSS skills, you’re stuck.

This experience led me to talk with my frequent collaborator Thomas Vroylandt about developing a package to help people more easily make nice-looking PDF reports from RMarkdown. Through our conversations, we realized that most people just want a decent-looking report, customized with their organization’s logo, fonts, and colors.

Enter pagedreport.

Our pagedreport package is designed to help you easily generate a report that looks nice enough to share with colleagues. Here are what the default templates, without any tweaking, look like.

windmill template
hazelnuts template
grid template

Each of the three built-in templates can be customized so the final report looks unique. And this can all be done from within RMarkdown (no messing around with HMTL, CSS, or JavaScript). I’ve made a video to show just how easy it is to create reports using pagedreport.

Full details about pagedreport, including installation instructions, can be found in the documentation. Happy report building!

Need additional support?

Customizing the three built-in templates pagedreport gives you a lot of flexibility to create distinctive reports. Need additional support to develop an RMarkdown template just for your organization? Want something like this package developed for Colorado-based OMNI Institute? Learn more about the consulting services offered by R for the Rest of Us and get in touch.

Just announced: R in 3 Months, a program to help you FINALLY learn R. Starts March 18.