Add dev_history.Rmd file that drives package development

add_dev_history(
  pkg = ".",
  overwrite = FALSE,
  open = TRUE,
  dev_dir = "dev",
  name = c("full", "minimal", "additional")
)

Arguments

pkg

Path where to save file

overwrite

Whether to overwrite existing dev_history.Rmd file

open

Logical. Whether to open file after creation

dev_dir

Name of directory for development Rmd files. Default to "dev".

name

Name of the template file. See details.

Value

Create a dev_history.Rmd file and return its path

Details

Choose name among the different templates available:

  • "full": the full template with a reproducible package to inflate directly. Default.

  • "minimal": Minimal template to start a new package when you already know fusen.

  • "additional": Template for an additionnal vignette, thus additional functions.

Examples

# Create a new project tmpdir <- tempdir() dummypackage <- file.path(tmpdir, "dummypackage") dir.create(dummypackage) # Add add_dev_history(pkg = dummypackage)
#> Created file .here in /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage . Please start a new R session in the new project directory.
#> [1] "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage/dev/dev_history.Rmd"
# Delete dummy package unlink(dummypackage, recursive = TRUE)