View source: R/comparesnapshot.R
CompareSnapshot | R Documentation |
Takes snapshot of a widget and compares it against another snapshot.
CompareSnapshot(
widget,
diff.file,
accepted.file,
delay = 0.2,
threshold = 0.1,
strict = FALSE,
...
)
widget |
The htmlwidget to display. |
diff.file |
Character; the name of the snapshot file taken. Only saved if there is a difference. |
accepted.file |
Character; the name of the snapshot to be compared against. If this file does not exist, it will be created from a snapshot of the widget. |
delay |
Time to wait before taking screenshot, in seconds. Sometimes a longer delay is needed for all assets to display properly. |
threshold |
Similarity parameter for comparing screenshots. |
strict |
Whether to give warning if |
... |
Other parameters passed to |
Return FALSE
only if the snapshot of the widget differs from
the accepted snapshot (i.e. returns TRUE
when the accepted snapshot
does not exist). The diff.file
is only created if FALSE
is
returned otherwise the snapshot will be saved as accepted.file
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.