Learn R Programming

docket (version 1.33)

getDictionary: Create a dictionary

Description

Scans the input file for strings enclosed by flag wings: « », then creates an empty dictionary with corresponding replacement values for each flag.

Usage

getDictionary(filename)

Value

A data frame where each row represents a flag in the template document and its replacement value

Arguments

filename

The file path to the document template. Supports .doc and .docx

Examples

Run this code

# Path to the sample template file included in the package
template_path <- system.file("template_document", "Template.docx", package="docket")

# Create a dictionary by using the getDictionary function on the sample template file
result <- getDictionary(template_path)
print(result)

Run the code above in your browser using DataLab