Description Usage Arguments Examples
View source: R/testthat-helper-plots.R
This function compares a stored .svg of a plot, to the plot that is created when the tests are run.
If no .svg exists yet then you must first run manageTestPlots
.
1 | expect_equal_plots(test, name, dir)
|
test |
The plot object you wish to test (does not work well for non-ggplot2 objects). |
name |
The name of the reference plot (a .svg stored in /tests/figs). |
dir |
The directory in tests/figs where the .svg is stored (commonly the name of the analysis). |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.