orderly_example: Set up an orderly example

Description Usage Arguments Value Examples

View source: R/testing.R

Description

Set up one of the orderly examples included with the package. These are not intended to be starting points for new orderly repositories, but are used in the package examples and vignettes.

Usage

1
2
3
4
5
6
7
orderly_example(
  name,
  path = tempfile(),
  run_demo = FALSE,
  quiet = FALSE,
  git = FALSE
)

Arguments

name

Name of the example

path

Destination to create the example - if it exists already it must be an empty directory. By default, creates a new temporary directory

run_demo

Logical, indicating if the example is configured as a "demo" (i.e., with a set of reports to be run and committed), should these be run?

quiet

Logical, indicating if informational messages should be suppressed when running the demo.

git

Logical, indicating if we should create an basic git repository along with the demo. This will have the default orderly .gitignore set up, and a remote which is itself (so that git pull and git fetch run without error, though they will do nothing).

Value

Returns the path to the orderly example

Examples

1
2
3
4
5
6
# Create a new copy of the "minimal" example
path <- orderly::orderly_example("minimal")
dir(path)

# Example reports within this repository:
orderly::orderly_list(path)

orderly documentation built on June 17, 2021, 5:08 p.m.