tests/testthat/helper-ggplot.R

is_ggplot <- if (exists("is_ggplot", envir = asNamespace("ggplot2"), inherits = FALSE)) {
  get("is_ggplot", envir = asNamespace("ggplot2"), inherits = FALSE)
} else {
  function(x) inherits(x, "ggplot")
}

Try the DataExplorer package in your browser

Any scripts or data that you put into this service are public.

DataExplorer documentation built on March 8, 2026, 9:06 a.m.