read_template {onbrand}R Documentation

Read Word or PowerPoint Templates

Description

Takes a given template file/yaml mapping file combination, reads in that information, checks to make sure the mapping information is correct and then returns an onbrand object.

Usage

read_template(
  template = file.path(system.file(package = "onbrand"), "templates", "report.pptx"),
  mapping = file.path(system.file(package = "onbrand"), "templates", "report.yaml"),
  verbose = TRUE
)

Arguments

template

Name of PowerPoint or Word file to annotate (defaults to included PowerPoint template)

mapping

Name of yaml file with configuration information

verbose

Boolean variable when set to TRUE (default) messages will be displayed on the terminal; Messages will be included in the returned onbrand object.

Value

onbrand object which is a list with the following elements:

Examples

obnd = read_template(
      template = file.path(system.file(package="onbrand"), "templates", "report.pptx"),
      mapping  = file.path(system.file(package="onbrand"), "templates", "report.yaml"))

obnd = read_template(
      template = file.path(system.file(package="onbrand"), "templates", "report.docx"),
      mapping  = file.path(system.file(package="onbrand"), "templates", "report.yaml"))


[Package onbrand version 1.0.5 Index]