createProject: createProject

Description Usage Arguments Details Examples

View source: R/createProject.R

Description

Create a package structure for a new consulting project. This builds on the normal package structure and provides subdirectories for data, outputs (client facing and internal), meetings etc.

Usage

1
2
3
4
5
createProject(consult_path = ".", client = NULL, project_name = NULL,
  overwrite = FALSE, project_documents = c("meetings", "documents",
  "initiation", "financials", "time", "planning", "milestones", "outputs",
  "data", "documentation"), documents_directory = "project_documents",
  use_package = FALSE)

Arguments

consult_path

string: path that consulting projects lie on, OR full path to directory

client

string: name of client

project_name

string: name of project

overwrite

logical: should existing project_documents directories be overwritten?

project_documents

string: the consulting project documents you want in this project, see Details

documents_directory

string: what sub-directory should the project documents be in? Default is project_documents

use_package

logical: should a package structure be used, or just create the directory? default is FALSE

Details

By default, the project directory is created, and then by default a set of sub-directories to help manage consulting projects under project_documents (can be changed by documents_directory). The directories are:

Controlling which are created uses the project_documents variable, giving a string denoting which group will be created. See the examples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# set a temp loc to create projects in
tmp_loc <- tempfile()

# giving all three pieces
createProject(tmp_loc, "RStars", "firstProject")
# see all the directories that get created
dir(file.path(tmp_loc, "RStars", "firstProject"), recursive = TRUE, include.dirs = TRUE)

# giving a single path
createProject(file.path(tmp_loc, "RStars", "secondProject"))

# using only a subset of documents
createProject(tmp_loc, "RStars", "thirdProject", project_documents = c("time", "issues"))
# see only some sub-directories
dir(file.path(tmp_loc, "RStars", "thirdProject"), recursive = TRUE, include.dirs = TRUE)

# change the documents_directory
createProject(tmp_loc, "RStars", "fourthProject", documents_directory = "consulting_documents")
dir(file.path(tmp_loc, "RStars", "fourthProject"), recursive = TRUE, include.dirs = TRUE)

## Not run: 
# not run, create an R package
createProject(tmp_loc, "RStars", "packageProject", use_package = TRUE)
dir(file.path(tmp_loc, "RStars", "packageProject"), recursive = TRUE, include.dirs = TRUE)

## End(Not run)

stephdesilva/consultthat documentation built on May 30, 2019, 11:46 a.m.