pkgload (version 1.0.2)

dev_example: 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, test = FALSE, run = FALSE, env = new.env(parent = globalenv()), quiet = FALSE)

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

test

if TRUE, code in \donttest{} will be commented out. If FALSE, code in \testonly{} will be commented out. This parameter is only used in R 3.2 and greater.

run

if TRUE, code in \dontrun{} will be commented out.

env

Environment in which code will be run.

Examples

Run this code
# NOT RUN {
# Runs installed example:
library("ggplot2")
example("ggplot")

# Runs develoment example:
dev_example("ggplot")
# }

Run the code above in your browser using DataCamp Workspace