R/add_flat_template.R
add_flat_template.Rd
Add flat Rmd file that drives package development
add_additional(
pkg = ".",
dev_dir = "dev",
flat_name = "additional",
overwrite = FALSE,
open = TRUE
)
add_minimal(
pkg = ".",
dev_dir = "dev",
flat_name = "minimal",
overwrite = FALSE,
open = TRUE
)
add_full(
pkg = ".",
dev_dir = "dev",
flat_name = "full",
overwrite = FALSE,
open = TRUE
)
add_flat_template(
template = c("full", "minimal", "additional", "teaching", "dev_history"),
pkg = ".",
dev_dir = "dev",
flat_name = template,
overwrite = FALSE,
open = TRUE
)
Path where to save file
Name of directory for development Rmarkdown files. Default to "dev".
Name of the file to write in dev. Use the name of the main function of your template to get chunks pre-filled with this function name.
Whether to overwrite existing flat Rmd template file with same name
Logical. Whether to open file after creation
Name of the template to use. See details.
Create flat Rmd file(s) template(s) and return its (their) path
Choose template
among the different templates available:
"full": The full template with a reproducible package that can directly be inflated. It comes along with the "dev_history" template. Default.
"minimal": Minimal template to start a new package when you already know fusen, along with the "dev_history" template.
"additional": Template for an additional vignette or set of additional functions.
"teaching": Template with a reproducible package, simpler than "full", but everything to teach the minimal structure of a package.
"dev_history": Template with functions commonly used during package development. This does not contain chunks to write your own functions.
Abbreviated names can also be used for the different templates: "add" for additional, "min" for minimal, "teach" for teaching, "dev" for "dev_history".
add_additional()
, add_minimal()
, add_full()
are wrapper around add_flat_template("additional")
, ...
However, add_dev_history()
is a deprecated function from a previous version.