Learn R Programming

org (version 2019.4.2)

InitialiseProject: Initialises project

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

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

Run this code
# 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
# }

Run the code above in your browser using DataLab