This repository contains a basic tutorial on the usage of the R packages pagedown and pagedreport.
Please refer to the authors website of both packages for more details:
- pagedown: https://pagedown.rbind.io/
- pagedreport: https://pagedreport.rfortherestofus.com/
- Great intro and tutorials:
This is an example report (pagedreport grid) in R Markdown using pagedreport:
This is the knitted output in PDF format:
The package pagedown is in CRAN, to install it just run this command in the R console:
install.packages("pagedown")
The package pagedreport is not in CRAN, to install it from the R console:
remotes::install_github("rfortherestofus/pagedreport", ref = "main")
If the remotes object is not installed, install it from the R console:
install.packages("remotes")
Pagedown uses a Chromium-based browser such as Chromium, Google Chrome, or Microsoft Edge to translate from html to pdf. Any of these browsers must therefore be installed and available on the system's path.
In Ubuntu based operating systems, the following dependencies might need to be installed from the system's console:
- rsvg
sudo apt install librsvg2-dev
- magick
sudo apt install libmagick++-dev
- curl
sudo apt install libcurl4-openssl-dev
In R Studio, to create a new report starting from a pagedreport template follow these steps:
1. Create a new R Markdown file. | 2. Select a pagedreport template from the R Markdown dialog window. |
After modifying the template, simply press the Knit button to generate the pdf report.