assemble_draft has been deprecated (as of development version 0.4.2) in favor of import_draft, which has the same semantics (and is actually now the same code -- assemble_draft is now only an alias for import_draft.) This should hopefully make the link between import_draft and import_pattern clear, and more importantly distinguish these functions from extract_pattern and the new extract_draft function.
assemble_draft(...)
... | A named vector of filenames which will be imported as patterns stored in the returned draft, with the names used as indices. Files should be plain text. |
---|
Returns a list (the same length as ...) containing the imported patterns.
pattern_file <- tempfile("out", tempdir(), ".Rmd")
export_template("my sample pattern", pattern_file)
assemble_draft("sample_pattern" = pattern_file)
#> Warning: assemble_draft has been deprecated in favor of import_draft, and
#> will be removed in a future release.
#> Please use import_draft instead.
#> $sample_pattern
#> [1] "my sample pattern"
#>