Learn R Programming

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

373

Version

1.0.6

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

September 23rd, 2024

Functions in onbrand (1.0.6)

template_details

Show Template Details for `onbrand` Object
view_layout

Generate Annotated Layout for Report Templates
fph

Fetch PowerPoint Placeholder
build_span

Construct Table Span From Components
ft_apply_md

Render Markdown in flextable Object
add_pptx_ph_content

Populate Placeholder In Officer Report
fetch_report_format

Fetch The Specified Report Formatting Information
md_to_officer

Parse Markdown for Officer
fetch_officer_object

Extracts Officer Object From Onbrand Report Object
fetch_rpttype

Determines Type of Report Template
fst

Fetch Word Style
fetch_md_def

Fetch Markdown Default Format from onbrand Object
report_add_slide

Add Slide and Content
onbrand

onbrand: officer Abstraction Layer for Organizational Templates
save_report

Save Onbrand Report to a File
set_officer_object

Places Officer Object Into Onbrand Report Object
preview_template

Generate Report Previewing the Locations From Mapping File
span_table

Spread Large Table Over Smaller Tables
report_add_doc_content

Add Content to Body of a Word Document Report
read_template

Read Word or PowerPoint Templates
md_to_oo

Parse Markdown into Officer as_paragraph Result
mk_lg_tbl

Creates Large Table Data for Testing