R/document.R

Defines functions CreateDocument

Documented in CreateDocument

#' Compile items into a document
#'
#' Form a properly formatted document from a list of paragraphs, images, and bullet-lists
#'
#' @param paragraphs A list of paragraph objects
#' @export

CreateDocument <- function(paragraphs){

  output <- Longform::implode(sprintf("%s", unlist(paragraphs)))

  #Class as document
  class(output) <- "document"

  #Return output
  return(output)

}
polymathematic/Longform documentation built on Oct. 1, 2018, 3:32 a.m.