Skip to contents

A convenience over file.copy(system.file("templates", "org-reference.docx", package = "quartifyr"), ...) – the docx itself is an opaque binary either way, so this is a plain file copy, no Python engine involved.

Usage

styling_example_template(
  dir = ".",
  file = "org-reference.docx",
  overwrite = FALSE,
  src = system.file("templates", "org-reference.docx", package = "quartifyr")
)

Arguments

dir

Destination directory. Created if it doesn't exist.

file

Destination filename within dir.

overwrite

Replace the destination if it already exists.

src

Reference-doc to copy. Defaults to the package's own bundled org-reference.docx; only worth overriding to start from an existing docx instead.

Value

The destination path (invisibly).

Examples

dest_dir <- tempfile("quartifyr-project-")
dir.create(dest_dir)
styling_example_template(dest_dir)
list.files(dest_dir)
#> [1] "org-reference.docx"