available_templates: List available R Markdown template in a package

View source: R/draft.R

available_templatesR Documentation

List available R Markdown template in a package

Description

List the available template by name that can be used with draft() to create a new document for R Markdown from a package.

Usage

available_templates(package = "rmarkdown", full_path = FALSE)

Arguments

package

Package to list template from. Default to rmarkdown

full_path

Set to TRUE to get the full path to the available templates

Value

A character vector of templates name to use within draft(). If full_path = TRUE, it returns the full path to the templates.

Examples

# List rmarkdown templates & create a draft
available_templates()

# List rticles templates
available_templates("rticles")

rmarkdown documentation built on Nov. 4, 2024, 5:06 p.m.