Skip to contents

An environment that stores the locations of folders used in the project.

Usage

project

Format

An environment containing the following elements:

home

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

results_today

The folder inside results with today's date. initialize_project() creates it.

See also

vignette("org"), whose "Project structure" section describes the standard folders and the additional-folder convention. org stores folders passed through ... here under their own names. This help page does not describe them individually.

Other project setup: initialize_project(), set_results()

Examples

home <- file.path(tempdir(), "org_project_example")
dir.create(file.path(home, "R"), recursive = TRUE, showWarnings = FALSE)

proj <- org::initialize_project(
  home = home,
  results = file.path(home, "results"),
  data_raw = file.path(home, "data_raw")
)
#> You are NOT sourcing into .GlobalEnv. All functions will be sourced into an environment that is returned from this function.
#> Sourcing all code inside /tmp/RtmppZAjz6/org_project_example/R into 

# Every folder is now available from anywhere in the analysis
org::project$home
#> [1] "/tmp/RtmppZAjz6/org_project_example/"
org::project$results
#> [1] "/tmp/RtmppZAjz6/org_project_example/results/"
org::project$results_today
#> [1] "/tmp/RtmppZAjz6/org_project_example/results/2026-08-21/"
org::project$data_raw
#> [1] "/tmp/RtmppZAjz6/org_project_example/data_raw/"

unlink(home, recursive = TRUE)