| is.gg | R Documentation |
This function tests whether an object is a ggplot2 plot object or a gtable (grid table) object.
is.gg(x)
x |
An object to test |
Logical. TRUE if x inherits from "ggplot" or "gtable", FALSE otherwise.
## Not run:
library(ggplot2)
p <- ggplot(mtcars, aes(x = mpg, y = hp)) + geom_point()
is.gg(p) # TRUE
is.gg(mtcars) # FALSE
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.