new_project
Create a New Framework Project
Convenience wrapper for creating Framework projects from the command line. Uses global settings configured via `setup()` as defaults, prompts for missing required values (name and location).
Usage
new_project(
name = NULL,
location = NULL,
type = "project",
browse = interactive(),
...
)
Arguments
| Argument | Description |
|---|---|
name
|
Project name. If NULL (default), prompts interactively. |
location
|
Directory path where project will be created. If NULL (default), prompts interactively. |
type
|
Project type. One of "project" (default), "project_sensitive", "course", or "presentation". |
browse
|
Whether to open the project folder after creation (default: TRUE in interactive sessions) |
...
|
Additional arguments passed to `project_ |
Details
This function is designed for the streamlined workflow:
remotes::install_github("table1/framework")
framework::setup() # One-time global configuration
framework::new_project() # Create projects using saved defaults
Global settings from ~/.config/framework/settings.yml are used for:
- Author information (name, email, affiliation
- Default packages
- Directory structure
- Git settings
- AI assistant configuration
- Quarto format preferences
Returns
Invisibly returns the result from project_create() (list with success, path, and project_id)
Examples
# Interactive - prompts for name and location
new_project()
# With name and location specified
new_project("my-analysis", "~/projects/my-analysis")
# Create a sensitive data project
new_project("medical-study", "~/projects/medical", type = "project_sensitive")
See Also
Source: R/new_project.R