framework docs
Project Management

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

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_

Value

Invisibly returns the result from `project_create()` (list with success, path, and project_id)

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 tools::R_user_dir("framework", "config") are used for:

  • Author information (name, email, affiliation
  • Default packages
  • Directory structure
  • Git settings
  • AI assistant configuration
  • Quarto format preferences

Examples

if (FALSE) {
# 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