craft_package: Craft a package using C code

View source: R/craft_package.R

craft_packageR Documentation

Craft a package using C code

Description

This function creates a bare-bones R package with a minimal C code development support.

Usage

craft_package(
  path,
  fields = list(),
  rstudio = rstudioapi::isAvailable(),
  open = rlang::is_interactive()
)

Arguments

path

A path. If it exists, it is used. If it does not exist, it is created, provided that the parent path exists.

fields

A named list of fields to add to DESCRIPTION, potentially overriding default values. See usethis::use_description() for how you can set personalized defaults using package options.

rstudio

If TRUE, calls use_rstudio() to make the new package or project into an RStudio Project. If FALSE and a non-package project, a sentinel .here file is placed so that the directory can be recognized as a project by the here or rprojroot packages.

open

If TRUE, activates the new project:

  • If RStudio desktop, the package is opened in a new session.

  • If on RStudio server, the current RStudio project is activated.

  • Otherwise, the working directory and active project is changed.

Value

Path to the newly created project or package, invisibly.


ramiromagno/craftthis documentation built on Aug. 11, 2022, 4:44 a.m.