Skip to contents

Adds tables by looking for magic string

Usage

add_tables(docx_in, docx_out, tables_path, debug = F)

Arguments

docx_in

input doc

docx_out

output doc

tables_path

path to tables file

debug

debug mode

Examples

if (FALSE) { # \dontrun{
# ---------------------------------------------------------------------------
# Load all dependencies
# ---------------------------------------------------------------------------
docx_in <- file.path(here::here(), "report", "shell", "template.docx")
doc_dirs <- make_doc_dirs(docx_in = docx_in)
figures_path <- file.path(here::here(), "OUTPUTS", "figures")
tables_path <- file.path(here::here(), "OUTPUTS", "tables")
footnotes <- file.path(here::here(), "report", "standard_footnotes.yaml")

# ---------------------------------------------------------------------------
# Step 1.
# Table addition running add_tables will format and insert tables into the doc.
# ---------------------------------------------------------------------------
add_tables(
  docx_in = doc_dirs$doc_clean,
  docx_out = doc_dirs$doc_tables,
  tables_path = tables_path
)
} # }