R/add_title_slide.R

Defines functions add_title_slide

#' Add Title Slide to PowerPoint Deck
#'
#' @param slide powerpoint slide
#' @param title character
#' @param subtitle character
#'
#' @return powerpoint slide
#' @export
#'
add_title_slide <- function(slide, title, subtitle = NULL) {
  officer::ph_with(
    slide, title, officer::ph_location_label(ph_label = "title")
  )
  if (!is.null(subtitle)) {
    officer::ph_with(
      slide, subtitle, officer::ph_location_label(ph_label = "subtitle")
    )
  }
}
cadenceinc/FlextableExtended documentation built on May 28, 2020, 12:49 a.m.