create_project: Creates a pre-populated project for DfE R

View source: R/create_project.R

create_projectR Documentation

Creates a pre-populated project for DfE R

Description

Creates a pre-populated project for DfE R

Usage

create_project(
  path,
  init_renv = TRUE,
  include_structure_for_pkg = FALSE,
  create_publication_proj = FALSE,
  include_github_gitignore,
  ...
)

Arguments

path

Path of the new project

init_renv

Boolean; initiate renv in the project. Default is set to true.

include_structure_for_pkg

Boolean; Additional folder structure for package development. Default is set to false.

create_publication_proj

Boolean; Should the folder structure be for a publication project. Default is set to false.

include_github_gitignore

Boolean; Should a strict .gitignore file for GitHub be created.

...

Additional parameters, currently not used

Details

This function creates a new project with a custom folder structure. It sets up the ⁠R/⁠ folder and template function scripts, initializes {testthat} and adds tests for the function scripts, builds the core project structure, creates a .gitignore file, creates a readme, and optionally initializes {renv}.

Value

No return values, the project and its contents are created

Examples

## Not run: 

# Call the function to create a new project
dfeR::create_project(
  path = "C:/path/to/your/new/project",
  init_renv = TRUE,
  include_structure_for_pkg = FALSE,
  create_publication_proj = FALSE,
  include_github_gitignore = TRUE
)

## End(Not run)

dfeR documentation built on April 12, 2025, 1:32 a.m.