-
Notifications
You must be signed in to change notification settings - Fork 286
/
Copy pathcreate_package.Rd
76 lines (66 loc) · 2.52 KB
/
create_package.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create.R
\name{create_package}
\alias{create_package}
\alias{create_project}
\alias{create_quarto_project}
\title{Create a package or project}
\usage{
create_package(
path,
fields = list(),
rstudio = rstudioapi::isAvailable(),
roxygen = TRUE,
check_name = TRUE,
open = rlang::is_interactive()
)
create_project(
path,
rstudio = rstudioapi::isAvailable(),
open = rlang::is_interactive()
)
create_quarto_project(name, ...)
}
\arguments{
\item{path}{A path. If it exists, it is used. If it does not exist, it is
created, provided that the parent path exists.}
\item{fields}{A named list of fields to add to \code{DESCRIPTION}, potentially
overriding default values. See \code{\link[=use_description]{use_description()}} for how you can set
personalized defaults using package options.}
\item{rstudio}{If \code{TRUE}, calls \code{\link[=use_rstudio]{use_rstudio()}} to make the new package or
project into an \href{https://r-pkgs.org/workflow101.html#sec-workflow101-rstudio-projects}{RStudio Project}.
If \code{FALSE} and a non-package project, a sentinel \code{.here} file is placed so
that the directory can be recognized as a project by the
\href{https://here.r-lib.org}{here} or
\href{https://rprojroot.r-lib.org}{rprojroot} packages.}
\item{roxygen}{Do you plan to use roxygen2 to document your package?}
\item{check_name}{Whether to check if the name is valid for CRAN and throw an
error if not.}
\item{open}{If \code{TRUE}, \link[=proj_activate]{activates} the new project:
\itemize{
\item If using RStudio desktop, the package is opened in a new session.
\item If on RStudio server, the current RStudio project is activated.
\item Otherwise, the working directory and active project is changed.
}}
\item{name}{name for quarto project folder}
\item{...}{pass quarto_create_project aditional arguments.}
}
\value{
Path to the newly created project or package, invisibly.
}
\description{
These functions create an R project:
\itemize{
\item \code{create_package()} creates an R package
\item \code{create_project()} creates a non-package project, i.e. a data analysis
project
\item \code{create_quarto_project()} creates a Quarto project
}
Both functions can be called on an existing project; you will be asked before
any existing files are changed.
}
\seealso{
\code{\link[=create_tidy_package]{create_tidy_package()}} is a convenience function that extends
\code{create_package()} by immediately applying as many of the tidyverse
development conventions as possible.
}