knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

bookprep

GitHub release (latest by date) GitHub DOI R build status Codecov test coverage

The goal of {bookprep} is to prepare a {bookdown} project from a customizable bookdown skeleton and, if needed, a template for the chapters. {bookprep} helps creating reproducible yet flexible bookdown projects, for instance to deliver data analyses to customers following a standardized format.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("marionlouveaux/bookprep")

Example

library(bookprep)

# Create temporary directory for reproducible example
dir_tmp <- tempfile(pattern = "proj-")
dir.create(dir_tmp)
# browseURL(dir_tmp)

prepare_book(
  path = dir_tmp,
  template = system.file("book_template_example", package = "bookprep"),
  replacements = c(
    # replacements mandatory for the bookdown skeleton
    "book_title" = "My book",
    "author_name" = "Marion Louveaux",
    "creation_date" = "`r Sys.Date()`",
    "short_description" = "An example of book with {bookprep}.",
    # replacement specific to my template that you can add if you want
    "index_title" = "Context"
  )
)

See also

{bookdown}: https://bookdown.org/

How to cite

Please cite as:
Marion Louveaux. (2021, May 26). bookprep: an R package to reproducibly prepare a {bookdown} project from a customizable skeleton and a template (Version v1.0.0). Zenodo. http://doi.org/10.5281/zenodo.4806181

Code of Conduct

Please note that the bookprep project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



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