Learn R Programming

packager (version 1.15.2)

use_template: Use a Template

Description

The devtools' or, later usethis' function hardcoded the source package, it had dialogs on opened files in RStudio. Did Stuff I do not want.

Usage

use_template(
  template,
  save_as = template,
  data = list(),
  ignore = FALSE,
  pkg = ".",
  source_package = "packager",
  git_commit = TRUE,
  force = isTRUE(getOption("packager")[["force"]])
)

Value

TRUE on success, FALSE otherwise.

Arguments

template

The name of the package's template (a file in the template directory).

save_as

The path where the template should be written to.

data

A named list of information used to render the new file from the template, typically the output of as.package.

ignore

Add the new file to .Rbuildignore?

pkg

The path to the package template shall be used for.

source_package

The name of the package from which the template should be read.

git_commit

Add the new file to git and commit?

force

Overwrite an existing file?