new_project.RdCreate New Project
new_project(
path,
template,
rstudio = rstudioapi::isAvailable(),
open = rlang::is_interactive()
)A file path for where the new project should be created.
The path to a YAML file containing the project structure.
Logical indicating whether RStudio should be used for the new
project. By default, it detects if RStudio is currently running and, if
TRUE, then usethis::use_rstudio is called to make an RStudio Project.
If FALSE, then a .here file is places in the directory so it can be
recognized within a project-oriented workflow via
here and
rprojroot.
Logical indicating whether the new project should be opened. By
default, it checks whether the function is run interactively with
rlang::is_interactive. If TRUE, the new project is activated and
opened. If FALSE, the working directory and active project are unchanged.
Path to the newly created project (invisibly).
if (FALSE) {
# Bare bones project with no existing content
new_project(
path = "~/Desktop/templatr-demo/",
template = template_demo_project()
)
# Project with files that have some structure
new_project(
path = "~/Desktop/templatr-demo/",
template = template_demo_project("demo-proj-source")
)
}