initialize_template: Initialize a book template with named chapters and base...

Description Usage Arguments Value Examples

View source: R/initialize_template.R

Description

Initialize a book template with named chapters and base content

Usage

1
2
3
4
5
initialize_template(
  path,
  chapters = c("Preface", "Introduction"),
  references = "References"
)

Arguments

path

where to create the template

chapters

titles of Rmd files to include in the template

references

title of the references Rmd or NULL

Value

used for side effect: file creation in path

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Create temporary directory for reproducible example
dir_tmp <- tempfile(pattern = "proj-")
dir.create(dir_tmp)
# browseURL(dir_tmp)

initialize_template(
  path = dir_tmp,
  chapters = c(
    "Introduction", "Material and Methods",
    "Results", "Discussion"
  ),
  references = NULL
)

marionlouveaux/bookprep documentation built on Dec. 21, 2021, 2:45 p.m.