pkg_create: Create a Boilerplate 'R' Package

Description Usage Arguments Details Author(s) Examples

View source: R/pkg_create.R

Description

Creates a boilerplate R package by generating the following:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
pkg_create(
  pkg_dir = getwd(),
  input_file = NULL,
  docs = TRUE,
  pkgdown = FALSE,
  travis = FALSE,
  appveyor = FALSE,
  readme = FALSE,
  add_description = NULL,
  add_namespace = NULL,
  add_rbuildignore = NULL,
  add_gitignore = NULL,
  add_travis = NULL,
  add_appveyor = NULL,
  git = FALSE,
  github = FALSE,
  commit_msg = "And so, it begins"
)

Arguments

pkg_dir

Character string. Directory where the package is initialized.

input_file

Character string. YAML file containing DESCRIPTION fields and entries.

docs

Character string. Ignore docs containing pkgdown files.

pkgdown

Logical. Create pkgdown YAML file.

travis

Logical. Create travis YAML file.

appveyor

Logical. Create appveyor YAML file.

readme

Logical. Create README.Rmd file.

add_description

Character string. Additional entries to the DESCRIPTION file not included in input_file.

add_namespace

Character string. Entries to the NAMESPACE in addition to the boilerplate example.

add_rbuildignore

Character string. Entries to the .Rbuildignore in addition to the boilerplate example.

add_gitignore

Character string. Entries to the .gitignore in addition to the boilerplate example.

add_travis

Character string. Entries to the .travis.yml in addition to the boilerplate example.

add_appveyor

Character string. Entries to the appveyor.yml in addition to the boilerplate example.

git

Logical. Set up a git repository.

github

Logical. Set up and push to a github repository.

commit_msg

Character string. Git commit message.

Details

Optionally, the function can also set up a Git repository and push the created repo to Github. This requires that git and hub are installed and configured in the system.

If you are going to document, check, and build your package using devtools, you may delete the boilerplate NAMESPACE and MAN files.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
pkg_create(
  pkg_dir = getwd(),
  pkg_name = "boilerplatePackage",
  input_file = "DESCRIPTION.csv",
  git = TRUE,
  github = TRUE
)

## End(Not run)

jeksterslabds/jeksterslabRpkg documentation built on Jan. 22, 2021, 11:43 p.m.