Learn R Programming

ubiquity (version 1.0.0)

system_report_doc_add_content: Add content to Body of a Word Document Report

Description

Appends content to the body of a word document

For example if you have <HEADER_LEFT> in the header of your document and you wanted to replace it with the text "Upper left" you would do the following:

cfg = system_report_doc_set_ph(cfg, ph_content = "Upper Left" , ph_name = "HEADER_LEFT", ph_location = "header")

Notice the ph_name just has HEADER_LEFT and leaves off the <>

Usage

system_report_doc_add_content(cfg, rptname = "default",
  content_type = NULL, content = NULL)

Arguments

cfg

ubiquity system object

rptname

report name initialized with system_report_init

content_type

name of the placeholder

content

list containing content to add

For each content type listed below the following content is expected:

  • "text" text string of information

  • "list" vector of paired values (indent level and text), eg. c(1, "Main Bullet", 2 "Sub Bullet")

  • "imagefile" image from a file

    • image string containing path to image file

    • caption Text containing the caption of the image

  • "ggplot" ggplot object, eg. p = ggplot() + ....

    • image ggplot object

    • caption Text containing the caption of the image

  • "table" list containing the table content and other options with the following elements (defaults in parenthesis):

    • table Data frame containing the tabular data

    • caption Text containing the caption of the table

    • header Boolean variable to control displaying the header (TRUE)

    • first_row Boolean variable to indicate that the first row contains header information (TRUE)

Value

cfg ubiquity system object with the content added to the body