viztest: Visually Test Package Examples

Description Usage Arguments Examples

Description

Execute all package examples in independent knitr files to capture images of each visual item produced, such as plots, htmlwidgets, shiny application objects.

Usage

1
2
3
4
5
6
viztest(pkg = ".", old_pkg = pkg_name(pkg), output_dir = paste("viztest",
  pkg_name(pkg), pkg_version(pkg), sep = "-"), ..., delay = 2,
  fig.width = 8, fig.height = 6, vwidth = 992, vheight = 744,
  test = TRUE, run = FALSE, stomp = FALSE, skip_old = FALSE,
  cache = FALSE, document = TRUE, save_individual = TRUE, resize = TRUE,
  browse = TRUE)

Arguments

pkg

Local R package to load with devtools

old_pkg

R package name description. This should either be a CRAN or GitHub name to work with devtools::install_cran or devtools::install_github respectively.

output_dir

Output directory. Defaults to "viztest-PKG-VERSION"

...

parameters sent to viz_compare

delay

Amount of delay to use before capturing

fig.width, fig.height

Figure width and height in inches

vwidth, vheight

Screenshot size in pixels

test

If TRUE, code in \donttest{} will be commented out. If FALSE, code in \testonly{} will be commented out.

run

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

stomp

If TRUE, allows viztest to reexecute in an existing output directory

skip_old

If TRUE, the old folder will not be deleted and the old package will not be executed

cache

If TRUE, the local R package examples will be cached with knitr for faster execution.

document

If TRUE, the local package will be documented before the examples are extracted

save_individual

If TRUE, individual example knitr files will be saved

resize

resize parameter supplied to webshot::resize. Defaults (TRUE) to shrink each dimension to 50 the original files.

browse

If TRUE, diff.html in output_dir will be opened

Examples

1
2
3
4
5
## Not run: 
# R session running in local R package folder
viztest(stomp = TRUE)

## End(Not run)

schloerke/viztest documentation built on May 26, 2019, 3:35 a.m.