create: Create a Package Template

View source: R/main.R

createR Documentation

Create a Package Template

Description

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

Usage

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

Arguments

path

The package to create.

force

Recursively unlink path before calling creating the package?

...

Arguments to be passed to infect.

Value

Invisibly NULL.

See Also

infect

Examples

path <- file.path(tempdir(), "myFirstPackage")
packager::create(path = path, fakemake = "roxygen2")
list.files(path, recursive = TRUE)
## Not run: 
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)
}

## End(Not run)

packager documentation built on Aug. 16, 2023, 5:08 p.m.