Learn R Programming

⚠️There's a newer version (1.0.8) of this package.Take me there.

onbrand

The officer package provides extensive methods for accessing, creating, and modifying both Word and PowerPoint documents. These methods require obtaining document specific placeholder and style information. In order to switch between document templates, it is necessary to change these references within the reporting code. The purpose of onbrand is to provide an abstraction layer where template details are mapped to human-readable names.

These human-readable names combined with the mapping information - in a template-specific yaml file - provides a systematic method to script support for different Word of PowerPoint templates. Which means, the same workflow will support multiple outputs. Which makes your life easier and, thus, makes the world a little better place.

Installation

You can install the released version of onbrand from CRAN with:

install.packages("onbrand")

And the development version from GitHub with:

# Installing devtools if it's not already installed
if(system.file(package="devtools") == ""){
  install.packages("devtools") 
}
devtools::install_github("john-harrold/onbrand", dependencies=TRUE)

Getting Started

Browse through the documentation and check out the vignettes:

  1. Custom Templates
  2. Templated Workflows

These vignettes contain everything you need to walk through the basics.

Copy Link

Version

Install

install.packages('onbrand')

Monthly Downloads

682

Version

1.0.7

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

July 22nd, 2025

Functions in onbrand (1.0.7)

onbrand

onbrand: officer Abstraction Layer for Organizational Templates
report_add_doc_content

Add Content to Body of a Word Document Report
save_report

Save Onbrand Report to a File
mk_lg_tbl

Creates Large Table Data for Testing
md_to_oo

Parse Markdown into Officer as_paragraph Result
set_officer_object

Places Officer Object Into Onbrand Report Object
read_template

Read Word or PowerPoint Templates
span_table

Spread Large Table Over Smaller Tables
report_add_slide

Add Slide and Content
preview_template

Generate Report Previewing the Locations From Mapping File
template_details

Show Template Details for `onbrand` Object
view_layout

Generate Annotated Layout for Report Templates
md_to_officer

Parse Markdown for Officer
add_pptx_ph_content

Populate Placeholder In Officer Report
fph

Fetch PowerPoint Placeholder
fst

Fetch Word Style
fetch_rpttype

Determines Type of Report Template
fetch_md_def

Fetch Markdown Default Format from onbrand Object
fetch_report_format

Fetch The Specified Report Formatting Information
build_span

Construct Table Span From Components
fetch_officer_object

Extracts Officer Object From Onbrand Report Object
ft_apply_md

Render Markdown in flextable Object