Learn R Programming

packager (version 1.15.2)

create: Create a Package Template

Description

This is just a wrapper to create a package and infect it using infect.

Usage

create(path, force = TRUE, ...)

Value

Invisibly

NULL.

Arguments

path

The package to create.

force

Recursively unlink path before calling creating the package?

...

Arguments to be passed to infect.

See Also

infect

Examples

Run this code
path <- file.path(tempdir(), "myFirstPackage")
packager::create(path = path, fakemake = "roxygen2")
list.files(path, recursive = TRUE)
if (FALSE) {
if (require("roxygen2")) {
  ml <- packager::get_package_makelist(is_cran = TRUE)
  d <- file.path(tempdir(), "somePackage")
  dir.create(d)
  packager::create(d, fakemake = FALSE, fakemake = FALSE)
  withr::with_dir(d, fakemake::make("check", ml))
  check_log <- file.path(d, "log", "check.Rout")
  status <- packager::get_check_status(check_log)
  RUnit::checkEqualsNumeric(status[["status"]][["errors"]], 0)
  list.files(d, recursive = TRUE)
  unlink(d, recursive = TRUE)
}
}

Run the code above in your browser using DataLab