initialize_project: create a new data analysis project

View source: R/initialize_project.R

initialize_projectR Documentation

create a new data analysis project

Description

automatically creates project directory and creates .Rproj file

Usage

initialize_project(
  path,
  sub_dirs = c("analysis_scripts", "preproc_scripts", "support_fx", "data_raw",
    "data_preproc", "figures", "results", "reports"),
  git_setup = TRUE,
  open = TRUE,
  readme_text = paste0("Welcome to ", basename(path), "!")
)

Arguments

path

full path of the project directory to be created

sub_dirs

character vector of high-level directories to add. Defaults to DEPENd Lab standard practice.

git_setup

logical. intitialize new git repository and perform initial commit

open

logical. open newly Rstudio project

description

text to display in README.md

Details

make sure to install github CLI to use gh commands: https://github.com/cli/cli#installation. Flesh this out at a later date

Author(s)

Nate Hall

Examples

## Not run: 
 initialize_project("~/Documents/github_repos/dimt_analysis")
 initialize_project("~/Documents/github_repos/dimt_analysis", git_setup = FALSE) # just creates directory structure with no git integration

## End(Not run)


PennStateDEPENdLab/dependlab documentation built on Sept. 26, 2024, 8:40 p.m.