orderly (version 1.0.4)

orderly_init: Initialise an orderly store

Description

Initialise an orderly store. This is a helper function that automates getting started with using orderly for a new project. It is not required to use - you can create the orderly structure yourself (all that is compulsory is the orderly_config.yml file).

Usage

orderly_init(root, doc = TRUE, quiet = FALSE)

Arguments

root

The root of the store; this must be an empty directory or the path of a directory to create

doc

Logical, indicating if documentation should be added to the directories. This also has the (potentially useful) effect of making these directories noticeable by git.

quiet

Logical, indicating if informational messages should be suppressed.

Value

The path to the newly created archive

Details

This function creates a minimal orderly structure, containing:

orderly_config.yml

The orderly configuration. Minimally, this can be empty, but it must exist.

src

The path where report sources live. This should be placed under version control, and contain a number of reports, each in their own directory with an orderly.yml describing their inputs and outputs (artefacts). The orderly_new function can be used to accelerate creation of new reports.

draft

A directory where reports will be run using orderly_run. This directory should be excluded from version control. orderly will create it as needed if it does not exist when a report is run.

archive

A directory where successfully run reports will be moved to after being committed with orderly_commit. This directory should be excluded from version control. orderly will create it as needed if it does not exist when a report is committed.

data

A directory where data extracted from the database (if used) will be stored. This directory should be excluded from version control. orderly will create it as needed if it does not exist when a report is run.

See Also

orderly_new for creating new reports within a configured orderly repository.

Examples

Run this code
# NOT RUN {
# Initialise a new orderly repository in an temporary directory:
path <- orderly::orderly_init(tempfile())

# This has created the directory skeleton that you need to get
# started using orderly:
fs::dir_tree(path)

# As instructed, the next thing to do is to edit the
# orderly_config.yml file to match your needs:
readLines(file.path(path, "orderly_config.yml"))
# }

Run the code above in your browser using DataLab