Skip to contents

This function works like usethis::create_project(), but extends the behavior to match the setup advocated by producethis, most importantly the existance of a DESCRIPTION file with the Type field set to the type of production job this project will be.

Usage

create_production(
  path,
  type = c("batch", "app", "api", "report"),
  ...,
  open = rlang::is_interactive(),
  report_type = "default"
)

Arguments

path

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

type

A string giving the type of project to create. Currently "batch", "app", "api", and "report" is recognized.

...

Arguments passed on to usethis::create_project

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 using 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.

report_type

If type is "report", what kind of report

Value

Path to the newly created project, invisibly.