View source: R/gradethis_equal.R
gradethis_equal.ggplot | R Documentation |
ggplot
s to check whether they are equalCompare two ggplot
s to check whether they are equal
## S3 method for class 'ggplot'
gradethis_equal(x, y, ...)
x, y |
Two |
... |
Unused |
A logical value of length one, or an internal gradethis error.
gradethis::gradethis_equal()
for the generic function.
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)
gradethis_equal(cty_plot, cty_plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.