Create template docs for packages or metworx

create_validation_templates(
  type = c("package", "metworx"),
  output_dir = system.file(package = "mrgvalidate"),
  new_folder = "template_renders",
  style_dir = NULL,
  cleanup_rmd = TRUE
)

Arguments

type

the type of doc you want to render ("package" or "metworx")

output_dir

Directory to write the output documents to. Defaults to system.file(package = "mrgvalidate").

new_folder

Folder within output_dir to render docs. Mainly useful when generating docs to a system directory that doesn't already exist

style_dir

Directory to check for a docx style reference

cleanup_rmd

Whether to delete the copied RMD's after the word documents are generated. Defaults to TRUE.

Details

Developer Notes:

  • Note: This function does not call the internal make_ functions responsible for creating the validation docs under normal circumstances.

  • system.file() wont register nested directories in the file path if the folder doesn't exist. In other words, output_dir = system.file("template_renders", package = "mrgvalidate") would return "", and the function would fail (because "template_renders" does not exist within inst). Use the new_folder argument when rendering to a new folder within inst.