Learn R Programming

berryFunctions (version 1.22.5)

testExamples: Test examples in a package

Description

Test all examples in a package

Usage

testExamples(
  path = packagePath("."),
  commentDontrun = FALSE,
  selection = NULL,
  logfolder = "ExampleTestLogs",
  elogfile = "errors.txt",
  wlogfile = "warnings.txt",
  tlogfile = "times.txt",
  plotfile = "plots.pdf",
  tellcurrentfile = TRUE,
  telldocument = TRUE,
  ...
)

Value

Logical indicating successful tests

Arguments

path

Path to package. For internal function testExample, path to a single Rd file. DEFAULT: packagePath(".")

commentDontrun

Logical. Should \dontrun sections be excluded? DEFAULT: FALSE

selection

Optional: selection of files, e.g 1:10. DEFAULT: NULL

logfolder

Directory where to store the logfiles. Created if not existing. DEFAULT: "ExampleTestLogs"

elogfile

File to log errors in. (Appended to existing text). DEFAULT: "errors.txt"

wlogfile

File to log warnings and messages in. (Appended to existing text). DEFAULT: "warnings.txt"

tlogfile

File in which to write computing times. DEFAULT: "times.txt"

plotfile

File to log warnings and messages in. (Appended to existing text). DEFAULT: "plots.pdf"

tellcurrentfile

Logical: At the beginning of each file, message the name and current time in the console?

telldocument

Message reminder to run devtools::document()? DEFAULT: TRUE

...

Further arguments passed to internal function testExample and from there to tools::Rd2ex

Author

Berry Boessenkool, berry-b@gmx.de, Mar 2019

See Also

The evaluate package

Examples

Run this code
# testExamples(selection=1:10)

Run the code above in your browser using DataLab