InitialiseProject: Initialises project

Description Usage Arguments Details Examples

View source: R/initialise.R

Description

'org::InitialiseProject' takes in 2+ arguments. It then saves its results (i.e. folder locations) in 'org::PROJ', which you will use in all of your subsequent code.

Usage

1
2
InitialiseProject(HOME = NULL, SHARED = NULL,
  folders_to_be_sourced = "code", codes_absolute = FALSE, ...)

Arguments

HOME

The folder containing 'Run.R' and 'code/'

SHARED

A folder inside ‘SHARED' with today’s date will be created and it will be accessible via 'org::PROJ$SHARED_TODAY' (this is where you will store all of your results)

folders_to_be_sourced

The names of folders that live inside 'HOME' and all .r and .R files inside it will be sourced into the global environment.

codes_absolute

If 'TRUE' then 'folders_to_be_sourced' is an absolute folder reference. If 'FALSE' then 'folders_to_be_sourced' is relative and inside 'HOME'.

...

Other folders that you would like to reference

Details

You need to run 'org::AllowFileManipulationFromInitialiseProject()' for this function to create today's folder (org::PROJ$SHARED_TODAY).

For more details see the help vignette: vignette("intro", package = "org")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
org::AllowFileManipulationFromInitialiseProject()
org::InitialiseProject(
  HOME = "/git/analyses/2019/analysis3/",
  SHARED = "/dropbox/analyses_results/2019/analysis3/",
  RAW = "/data/analyses/2019/analysis3/"
)
org::PROJ$SHARED_TODAY
org::PROJ$RAW

## End(Not run)

org documentation built on May 1, 2019, 8:43 p.m.