setup_dirs: Create standard project directories

Description Usage Arguments Examples

View source: R/setup.R

Description

Create standard project directories

Usage

1
2
setup_dirs(..., default = "cos", .list = list(`1_data` = default,
  `9_report` = default, lib = ""))

Arguments

...

named characters where name=directory_name and value=character_codes_for_dirs, or unnamed characters where value=directory_name (and default will be used for character_codes_for_dirs). Permitted letters for character_codes_for_dirs are c=cfg, d=doc, j=job, o=out, and s=src

default

string identifying the default set of character_codes_for_dirs. one letter per subdirectory. Permitted letters are c=cfg, d=doc, j=job, l=log, o=out, and s=src

.list

as an alternative to ..., use .list to specify directories in a single list argument

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# prep
dir.create('example_project')
setwd('example_project')

setup_dirs()
setup_dirs('2_data','3_analyze','4_report','explore'='',default='cdos')
setup_dirs('1a_siteinfo','1b_discharge','2_clean'='dos','3_model'='cjs','explore'='')

# clean up
setwd('..')
unlink('example_project', recursive=TRUE)

USGS-R/scipiper documentation built on Aug. 14, 2018, 5:23 a.m.