dev_example: Run a examples for an in-development function.

Description Usage Arguments Examples

View source: R/dev-example.r

Description

dev_example is a replacement for example. run_example is a low-level function that takes a path to an Rd file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dev_example(topic, quiet = FALSE)

run_example(
  path,
  run_donttest = FALSE,
  run_dontrun = FALSE,
  env = new.env(parent = globalenv()),
  quiet = FALSE,
  macros = NULL,
  run,
  test
)

Arguments

topic

Name or topic (or name of Rd) file to run examples for

quiet

If TRUE, does not echo code to console.

path

Path to .Rd file

run_donttest

if TRUE, do run \donttest sections in the Rd files. out.

run_dontrun

if TRUE, do run \dontrun sections in the Rd files.

env

Environment in which code will be run.

macros

Custom macros to use to parse the .Rd file. See the macros argument of tools::parse_Rd(). If NULL, then the tools::Rd2ex() (and tools::parse_Rd()) default is used.

run, test

Deprecated, see run_dontrun and run_donttest above.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Runs installed example:
library("ggplot2")
example("ggplot")

# Runs develoment example:
dev_example("ggplot")

## End(Not run)

pkgload documentation built on April 6, 2021, 5:07 p.m.