Compare two ggplot
s to check whether they are equal
Source: R/gradethis_equal.R
gradethis_equal.ggplot.Rd
Compare two ggplot
s to check whether they are equal
Value
A logical value of length one, or an internal gradethis error.
See also
gradethis::gradethis_equal()
for the generic function.
Examples
library(ggplot2)
library(ggcheck)
library(gradethis)
cty_plot <- ggplot(mpg, aes(x = displ, y = cty)) + geom_point()
hwy_plot <- ggplot(mpg, aes(x = displ, y = cty)) + geom_point()
gradethis_equal(cty_plot, hwy_plot)
#> [1] FALSE
gradethis_equal(cty_plot, cty_plot)
#> [1] TRUE