Skip to contents

Create a new ERS Quarto or R Markdown file from a template

Usage

ers_template(file_name, include_walkthrough = FALSE, type = c("qmd", "rmd"))

Arguments

file_name

The name of the new file to create (e.g., "my_report"). You do not need to include the .qmd or .Rmd extension.

include_walkthrough

If TRUE or "yes", use the walkthrough template; otherwise, use the standard template

type

The type of file to create: "qmd" (Quarto, the default) or "rmd" (R Markdown)

Value

Invisibly returns the path of the new file created in your working directory

Examples

if (FALSE) { # \dontrun{
# Quarto (the default) - creates my_report.qmd
ers_template("my_report")

# Quarto walkthrough, with inline guidance
ers_template("my_report", include_walkthrough = TRUE)

# R Markdown - creates my_report.Rmd
ers_template("my_report", type = "rmd")
} # }