To create a new project, this function calls usethis::create_project(),
then proj_use_description() to create a DESCRIPTION file.
The function acts in the same way as usethis::create_project(); provide
an absolute path, or a relative path from your current working-directory.
proj_create(
path,
rstudio = rstudioapi::isAvailable(),
open = rlang::is_interactive(),
fields = list()
)A path. If it exists, it is used. If it does not exist, it is created, provided that the parent path exists.
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.
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.
A named list of fields to add to DESCRIPTION, potentially
overriding default values. See use_description() for how you can set
personalized defaults using package options
Invisible NULL, called for side effects.
# not run because it produces side effects
if (FALSE) {
proj_create("../new-project-name")
}