View source: R/check_template.R
check_template | R Documentation |
Check if the parts of a template are in place, based on the template's spec.
check_template(template, name = "", dir = ".", spec = NULL)
template |
Name of the template (e.g., |
name |
Name of the template instance (e.g., |
dir |
Path to the base directory of the template. |
spec |
The template's spec; specify if template spec files do not exist. |
A list with results of the check:
dir | Path of the checked directory. |
files | Path(s) of the checked files. |
spec | A list with the template's spec. |
status | A named logical vector indicating whether each components exist. |
incomplete | A character vector with any existing files that still have template text. |
exists | all(status) |
message | A character vector including messages associated with failures. |
## Not run:
# precheck before a new template is made
check_template("template_new", list(name = "new", context = "new", files = list("new.R")))
# check the new template after creation
check_template("new")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.