Creates a new project directory and applies a theme to it.
Usage
create_project(path, theme, open = rlang::is_interactive())Arguments
- path
Path for the new project directory. Resolved to an absolute path via
fs::path_abs().- theme
A
prefab_themeobject created bynew_theme()or a pre-set theme function.- open
Whether to activate the new project after creating it, following the convention of
usethis::create_project()andusethis::create_package(): whenTRUE, the project opens in a new session/window in RStudio/Positron, or in other editors the working directory of the active session is changed into the new project. Defaults torlang::is_interactive(), so it opens interactively but stays inert in scripts, tests, and non-interactive callers.
Examples
if (FALSE) { # \dontrun{
create_project("~/projects/my-analysis", r_analysis())
create_project("my-targets-project", r_targets() + claude_r_targets())
} # }
