import_pattern: Quickly import plaintext files.

Description Usage Arguments Value See Also Examples

View source: R/import_pattern.R

Description

Longer, multi-chunk patterns can benefit from being developed in files independent of the rest of a draft. This is a quick wrapper function to import those patterns as objects for assembly into a draft.

Usage

1
import_pattern(filepath)

Arguments

filepath

A valid character string to the plaintext file containing the pattern.

Value

A character string, typically used to assemble a draft.

See Also

Other import functions: extract_draft(), extract_pattern(), import_draft()

Examples

1
2
3
pattern_file <- tempfile("out", tempdir(), ".Rmd")
export_template("my sample pattern", pattern_file)
import_pattern(pattern_file)

heddlr documentation built on March 24, 2020, 9:07 a.m.