prj_start_package: Creates package structure inside the project.

Description Usage Arguments Details See Also Examples

Description

Creates package structure inside the project.

Usage

1
2
prj_start_package(name, prj = NULL, skip_rc = FALSE,
  tmpl = "builtin")

Arguments

name

name of the package to create. It must not contain special characters like \/\"\'<> otherwise package folder could not be created. It must not contain _ also as it is requirement enforced on R package names. The folder must not exist. (type: character).

prj

project object to create the package in. If not passed will init project from working directory. (type: rsuite_project, default: NULL)

skip_rc

if TRUE skip adding package under revision control. (type: logical, default: FALSE)

tmpl

name of the package template (or path to it) to use for package structure creation. (type: character).

Details

It fails if the package exists already in the project.

Logs all messages from the building process onto the rsuite logger. Use logging::setLevel to control logs verbosity. DEBUG level turns on building and downloading messages.

Package templates have to include the following files: DESCRIPTION, NAMESPACE, NEWS

See Also

Other in project management: prj_build, prj_clean_deps, prj_init, prj_install_deps, prj_load, prj_lock_env, prj_pack, prj_start, prj_unload, prj_zip

Examples

1
2
3
4
5
6
7
8
9
# create exemplary project base folder
prj_base <- tempfile("example_")
dir.create(prj_base, recursive = TRUE, showWarnings = FALSE)

# start project
prj <- prj_start("my_project", skip_rc = TRUE, path = prj_base)

# start package in it
prj_start_package("mypackage", prj = prj, skip_rc = TRUE)

RSuite documentation built on June 10, 2019, 5:03 p.m.