| Title: | Wrapper for 'run_example()' |
|---|---|
| Description: | Captures errors or missing examples encountered when iteratively running 'run_examplez()', and archives them. |
| Authors: | Barry Zeeberg [aut, cre] |
| Maintainer: | Barry Zeeberg <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.0 |
| Built: | 2026-09-27 11:19:44 UTC |
| Source: | https://github.com/cran/runExamplesWrapper |
run an example retrieved from a man .Rd file
run_examplez( path, run_donttest = TRUE, run_dontrun = TRUE, env = new.env(parent = globalenv()), quiet = TRUE, macros = NULL, run, test )run_examplez( path, run_donttest = TRUE, run_dontrun = TRUE, env = new.env(parent = globalenv()), quiet = TRUE, macros = NULL, run, test )
path |
character string containing the full path name of the package directory |
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. |
quiet |
If TRUE, does not echo code to console |
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 |
Deprecated, see run_dontrun and run_donttest above. |
test |
Deprecated, see run_dontrun and run_donttest above. |
my own version of pkgload::run_example() to improve the return value
returns a character vector whose names are the man .Rd files and whose values are c("GOOD", "BAD", "MIA")
## Not run: # use your own package directory x<-tryCatch(run_examplez(sprintf("%s/man/%s",getwd(),"compareProbs.Rd")),error = function(e) { # What to do if an error happens message("An error occurred, but we caught it!") return("BAD") }) ## End(Not run)## Not run: # use your own package directory x<-tryCatch(run_examplez(sprintf("%s/man/%s",getwd(),"compareProbs.Rd")),error = function(e) { # What to do if an error happens message("An error occurred, but we caught it!") return("BAD") }) ## End(Not run)
driver to automate iterating run_examplez() and retrieve the test results for each example
runExamplesWrapper(dir, quiet = TRUE, run_donttest = TRUE, run_dontrun = TRUE)runExamplesWrapper(dir, quiet = TRUE, run_donttest = TRUE, run_dontrun = TRUE)
dir |
character string containing the full path name of the package directory |
quiet |
parameter to be passed to run_examplez() |
run_donttest |
parameter to be passed to run_examplez() |
run_dontrun |
parameter to be passed to run_examplez() |
returns a character vector specifying each function example as either "GOOD", "BAD", or "MIA"
## Not run: # use your own package directory runExamplesWrapper(getwd()) ## End(Not run)## Not run: # use your own package directory runExamplesWrapper(getwd()) ## End(Not run)