Skip to content

Make Document Directories

The make_doc_dirs() function in the reportifyr package generates a structured set of output paths for a given docx_in.


make_doc_dirs()

R: Helper function that defines document output paths
make_doc_dirsR Documentation

Description

Helper function that defines document output paths

Usage

make_doc_dirs(docx_in)

Arguments

docx_in

The file path to the input .docx file.

Value

A list of document paths

Examples

## Not run: 

# ---------------------------------------------------------------------------
# Load all dependencies
# ---------------------------------------------------------------------------
docx_in <- here::here("report", "shell", "template.docx")
doc_dirs <- make_doc_dirs(docx_in = docx_in)

## End(Not run)

Returns

A named list containing file paths for doc_in, doc_clean, doc_tables, doc_tabs_figs, doc_draft, and doc_final.


Logging

  • Debug: Logs the start and end of the function and any base_path adjustments.
  • Info: Logs docx_in and doc_name validation, as well as file path creation.
  • Error: Logs errors for missing docx_in and issues with docx_in file extensions.

Additional Resources

  • reportifyr GitHub: Refer to the reportifyr repository for more details.