Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use_rmarkdown_template

Add an RMarkdown Template


Description

Adds files and directories necessary to add a custom rmarkdown template to RStudio. It creates:

  • inst/rmarkdown/templates/{{template_dir}}. Main directory.

  • skeleton/skeleton.Rmd. Your template Rmd file.

  • template.yml with basic information filled in.

Usage

use_rmarkdown_template(
  template_name = "Template Name",
  template_dir = NULL,
  template_description = "A description of the template",
  template_create_dir = FALSE
)

Arguments

template_name

The name as printed in the template menu.

template_dir

Name of the directory the template will live in within inst/rmarkdown/templates. If none is provided by the user, it will be created from template_name.

template_description

Sets the value of description in template.yml.

template_create_dir

Sets the value of create_dir in template.yml.

Examples

## Not run: 
use_rmarkdown_template()

## End(Not run)

usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.