All Projects → reconverse → reportfactory

reconverse / reportfactory

Licence: other
Lightweight infrastructure to handle multiple rmarkdown reports

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to reportfactory

Rmarkdown
Dynamic Documents for R
Stars: ✭ 2,319 (+3310.29%)
Mutual labels:  rmarkdown, r-package
epoxy
Extra-strength glue engines for R Markdown and Quarto
Stars: ✭ 141 (+107.35%)
Mutual labels:  rmarkdown, knitr
Knitr Book
Dynamic Documents with R and knitr
Stars: ✭ 215 (+216.18%)
Mutual labels:  rmarkdown, knitr
Wraprmd
RStudio addin for wrapping RMarkdown paragraphs
Stars: ✭ 87 (+27.94%)
Mutual labels:  rmarkdown, knitr
linguisticsdown
Easy Linguistics Document Writing with R Markdown
Stars: ✭ 24 (-64.71%)
Mutual labels:  rmarkdown, r-package
Liftr
🐳 Containerize R Markdown documents for continuous reproducibility
Stars: ✭ 155 (+127.94%)
Mutual labels:  rmarkdown, knitr
xaringanBuilder
An R package for building xaringan slides into multiple outputs, including html, pdf, png, gif, pptx, and mp4.
Stars: ✭ 157 (+130.88%)
Mutual labels:  rmarkdown, r-package
Posterdown
Use RMarkdown to generate PDF Conference Posters via HTML
Stars: ✭ 602 (+785.29%)
Mutual labels:  rmarkdown, r-package
xaringan slides
📺 Links to HTML5 presentations made using the R package {xaringan}.
Stars: ✭ 20 (-70.59%)
Mutual labels:  rmarkdown, knitr
bubblyr
☁️ ☁️ ☁️ Beautiful Bubbles in Shiny and RMarkdown Backgrounds
Stars: ✭ 16 (-76.47%)
Mutual labels:  rmarkdown, rmarkdown-document
Klippy
Copy to Clipboard Buttons for RMarkdown HTML Documents
Stars: ✭ 40 (-41.18%)
Mutual labels:  rmarkdown, knitr
TDAstats
R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.
Stars: ✭ 26 (-61.76%)
Mutual labels:  r-package, r-packages
Knitrhooks
Extend {knitr} with hooks
Stars: ✭ 32 (-52.94%)
Mutual labels:  rmarkdown, knitr
Knitr
A general-purpose tool for dynamic report generation in R
Stars: ✭ 2,134 (+3038.24%)
Mutual labels:  rmarkdown, knitr
Rticles
LaTeX Journal Article Templates for R Markdown
Stars: ✭ 895 (+1216.18%)
Mutual labels:  rmarkdown, r-package
r-novice-inflammation
Programming with R
Stars: ✭ 142 (+108.82%)
Mutual labels:  rmarkdown, knitr
Kableextra
Construct Complex Table with knitr::kable() + pipe.
Stars: ✭ 465 (+583.82%)
Mutual labels:  rmarkdown, knitr
Jupytext
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
Stars: ✭ 4,969 (+7207.35%)
Mutual labels:  rmarkdown, knitr
fabricerin
Create Easily Canvas in Shiny and RMarkdown Documents
Stars: ✭ 52 (-23.53%)
Mutual labels:  rmarkdown, rmarkdown-document
weasydoc
Convert R Markdown to PDF Using Weasyprint (or Prince XML)
Stars: ✭ 40 (-41.18%)
Mutual labels:  rmarkdown, rmarkdown-document

Codecov test coverage R-CMD-check

Welcome to reportfactory!


NOTE

This version of {reportfactory} works in a very different way to the previous unreleased version. For those already using {reportfactory} in their pipelines you can obtain the old version using the {remotes} package:

remotes::install_github("reconverse/reportfactory@old_version")

You can also download it directly from https://github.com/reconverse/reportfactory/releases/tag/old_version.

You can install the current version of the package from CRAN with:

install.packages("reportfactory")

The development version can be installed from GitHub with:

if (!require(remotes)) {
  install.packages("remotes")
}
remotes::install_github("reconverse/reportfactory", build_vignettes = TRUE)

reportfactory in a nutshell

{reportfactory} is a R package which facilitates workflows for handling multiple .Rmd reports, compiling one or several reports in one go, and storing outputs in well-organised, timestamped folders. This is illustrated in the figure below:


workflow


There a few key principles it adheres to:

  • Simple: only focusses on the compilation of reports with minimum overhead for the user.

  • Non-invasive: .Rmd documents need no alteration to work within the factory.

  • Reproducible: time-stamped folder structure and customisable subfolders make viewing the same report over time a breeze; handling of package dependencies facilitates the deployment of factories on multiple computers.

  • Time-saving: easy compilation of multiple reports using regular expressions; book-keeping is handled by the factory and ensures that: i) every report is compiled in a clean environment and ii) all outputs are stored in a dedicated folder

Installing the package

To install the development version of the package, use:

remotes::install_github("reconverse/reportfactory")

Quick start

Step 1 - Create a new factory

Create and open a new factory. Here, we create the factory with the default settings. This will create the factory in our current working directory and then move us in to this new factory.

library(reportfactory)
new_factory("my_factory")

Step 2 - Add your reports

Here we’ve already created some with most of the default arguments being set to TRUE (the default). These default settings include both an example report and some associated data (report_sources/example_report.Rmd and data/raw/example_data.csv). The helper functions below show the state of the factory.

list_reports()       # list all available report sources
#> [1] "example_report.Rmd"
list_deps()          # list all of the dependencies of the reports
#> [1] "rmarkdown" "fs"        "knitr"
list_outputs()       # currently empty
#> character(0)

Step 3 - Compile report(s)

The compile_reports() function can be used to compile a report using regular expressions matched against the full filename of reports within the factory.

This ability to use of regular expressions is useful when you’re actively working on developing your reports but once the factory is setup we recommend passing full filenames to the function so it is always clear what will be built.

compile_reports( 
  reports = "example_report.Rmd"
)
#> >>> Compiling report: example_report
#> All done!

Use list_ouputs() to view the report outputs.

list_outputs()
#> [1] "example_report/2021-07-13_T12-16-03/example_report.html"
#> [2] "example_report/2021-07-13_T12-16-03/example_report.Rmd"

compile_reports() can also be used to pass a set of parameters to use with a parameterised report (here we use a subfolder argument to distinguish the parameterised reports).

compile_reports(
  reports = "example_report.Rmd",
  params = list(graph = FALSE),
  subfolder = "regional"
)
#> >>> Compiling report: example_report
#>       - with parameters: graph = FALSE
#> All done!
list_outputs()
#> [1] "example_report/2021-07-13_T12-16-03/example_report.html"         
#> [2] "example_report/2021-07-13_T12-16-03/example_report.Rmd"          
#> [3] "example_report/regional/2021-07-13_T12-16-04/example_report.html"
#> [4] "example_report/regional/2021-07-13_T12-16-04/example_report.Rmd"

Note that reports can also be an integer or a logical vector, in which case it is interpreted as a subset of files output by list_reports(). For instance:

  • compile_reports(reports = c(1, 3)) will compile the first and third reports listed by list_reports(); and
  • compile_reports(reports = TRUE) will compile all reports.

Factory overview

If you want to have an overview of your entire factory then you can use the factory_overview() function:

factory_overview()
#> /home/tim/github/reconverse/reportfactory/my_factory
#> ├── README.md
#> ├── data
#> │   ├── clean
#> │   └── raw
#> │       └── example_data.csv
#> ├── factory_config
#> ├── my_factory.Rproj
#> ├── outputs
#> │   └── example_report
#> │       ├── 2021-07-13_T12-16-03
#> │       │   ├── example_report.Rmd
#> │       │   └── example_report.html
#> │       └── regional
#> │           └── 2021-07-13_T12-16-04
#> │               ├── example_report.Rmd
#> │               └── example_report.html
#> ├── report_sources
#> │   └── example_report.Rmd
#> └── scripts

Contributing guidelines

Contributions are welcome via pull requests.

Code of Conduct

Please note that the reportfactory project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].