Skip to contents

Define the project directory for a workflow

Usage

defineProject(
  project_name,
  path = ".",
  renv = TRUE,
  docker = TRUE,
  github = FALSE,
  private = FALSE,
  github_actions = FALSE,
  parallel_plan = jfmisc::suitableParallelPlan(),
  force = FALSE
)

Arguments

project_name

project name/title

path

target file path for project directory

renv

add infrastructure for reproducible R package environment management from the renv package

docker

TRUE/FALSE. Create project infrastructure for building a docker container to compile the project.

github

TRUE/FALSE. Create a GitHub repository?

private

TRUE/FALSE. Should the GitHub repository be private? Evaluated only if argument github is TRUE.

github_actions

TRUE/FALSE. Add Github actions infrastructure? Evaluated only if argument github is TRUE.

parallel_plan

An expression denoting the future parallel plan to use in the project template. See future::plan() for more information on future parallel plans.

force

force project creation if project directory already exists

Value

An S4 object of class Project.

Examples

workflow_project <- defineProject('A metabolomics project')

workflow_project
#> Project name: A metabolomics project 
#> Directory path: . 
#> Use renv: TRUE 
#> Docker: TRUE 
#> GitHub repository: FALSE 
#> Private repository: FALSE 
#> GitHub Actions: FALSE 
#> Parallel plan: jfmisc::suitableParallelPlan() 
#> Force creation: FALSE