Learn R Programming

heddlr: Functional Programming Concepts for R Markdown Documents

R Markdown is an incredible tool, allowing you to trivially create professional-quality HTML (and PDF and more) documents from simple Markdown documents. However, if those documents have sections which repeat multiple times for different slices of your data, you can wind up spending a lot of time copying and pasting parts of your document. This can make it tricky to update your documents if you decide you want to tweak pieces of your report, and can force you to spend a lot of time updating and double-checking your document if you’re trying to report on information from an changing data set.

heddlr seeks to address these challenges by providing tools to make your R Markdown DRYer (that is, don’t repeat yourself). By making it easier to dynamically piece together components of your document based on your data source, heddlr makes it easier for you to write cleaner documents and create your reports faster.

For examples of what this looks like, check out the intro vignette and the more involved example.

Installation

If the CRAN version badge above is green, you can install the released version of heddlr from CRAN with:

install.packages("heddlr")

You can always get the most up-to-date development version with:

# install.packages("devtools")
devtools::install_github("mikemahoney218/heddlr")

Copy Link

Version

Install

install.packages('heddlr')

Monthly Downloads

190

Version

0.6.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Mahoney

Last Published

March 24th, 2020

Functions in heddlr (0.6.0)

bulk_replace

Bulk replace a pattern throughout multiple files.
provide_parameters

Easily provide parameters to R Markdown render calls
make_template

Linearly combine template elements into templates
use_parameters

Automatically include session objects as report parameters
assemble_draft

Deprecated function for draft import
extract_draft

Extract multiple patterns into a single draft object
heddlr-package

heddlr: Dynamic R Markdown Document Generation
create_yaml_header

Convert list objects into R Markdown YAML headers
heddle

Transform pattern objects into template pieces
export_template

Safely export templates to file.
import_pattern

Quickly import plaintext files.
import_draft

Import multiple patterns into a single draft object
extract_pattern

Extract patterns from larger documents