These widgets can be used at the console and embedded in a R Markdown document or Shiny application.
widget_toggle_(before, after, ..., width = NULL, height = NULL) widget_slide_(before, after, ..., width = NULL, height = NULL) widget_diff_(before, after, ..., width = NULL, height = NULL) widget_toggle(before, after, ..., width = NULL, height = NULL) widget_slide(before, after, ..., width = NULL, height = NULL) widget_diff(before, after, ..., width = NULL, height = NULL)
before | The picture that is taken as reference. |
---|---|
after | The picture against which the reference is compared. |
... | Unused. Meant for collecting unknown arguments and allow widget extensions. |
width | Fixed width for widget (in css units). The default is
|
height | Fixed height for widget (in css units). The default is
|
The regular versions take plots or functions as before
and
after
arguments (see expect_doppelganger()
for details). The
versions suffixed with underscores take HTML image sources. These
can be paths to SVG files or inlined SVG images. Currently,
widget_diff_()
is compatible only with inlined images.