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

View source: R/dev-example.R

dev_exampleR Documentation

Run a examples for an in-development function.

Description

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

Usage

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.

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

## Not run: 
# Runs installed example:
library("ggplot2")
example("ggplot")

# Runs development example:
dev_example("ggplot")

## End(Not run)

pkgload documentation built on June 28, 2024, 5:07 p.m.