orderly_list_drafts {orderly}R Documentation

List draft and archived reports

Description

List draft and archived reports. This returns a data.frame with columns name (see orderly_list()) and id.

Usage

orderly_list_drafts(root = NULL, locate = TRUE, include_failed = FALSE)

orderly_list_archive(root = NULL, locate = TRUE)

Arguments

root

The path to an orderly root directory, or NULL (the default) to search for one from the current working directory if locate is TRUE.

locate

Logical, indicating if the configuration should be searched for. If TRUE and config is not given, then orderly looks in the working directory and up through its parents until it finds an orderly_config.yml file.

include_failed

Logical, indicating if failed drafts should be listed (only has an effect for orderly_list_drafts as no failed run should make it into the archive). A failed report is one that lacks an orderly_run.rds file.

Value

A data.frame with columns name and id, containing character vectors of report names and versions, respectively.

See Also

orderly_list(), which lists the names of source reports that can be run, and orderly_latest() which returns the id of the most recent report.

Examples

# The orderly demo, with lots of potential reports:
path <- orderly::orderly_example("demo")

# Reports that _could_ be run:
orderly::orderly_list(path)

# Run a report twice:
id1 <- orderly::orderly_run("minimal", root = path)
id2 <- orderly::orderly_run("minimal", root = path)

# We can see both drafts:
orderly::orderly_list_drafts(path)

# Nothing is in the archive:
orderly::orderly_list_archive(path)

# Commit a report:
orderly::orderly_commit(id2, root = path)

# Only one draft now
orderly::orderly_list_drafts(path)

# And the second report is in the archive:
orderly::orderly_list_archive(path)

[Package orderly version 1.4.3 Index]