This example fails if gridGraphics is missing. Should we wrap the whole example in @examplesIf gridGraphics? Or perhaps it's better to note the requirement more explicitly:
# You can even add base graphics if you pass it as a formula (requires gridGraphics package)
if (requireNamespace("gridGraphics", quietly = TRUE)) {
p1 + wrap_elements(full = ~ plot(mtcars$mpg, mtcars$disp))
# Adding a grob or formula directly is equivalent to placing it in `full`
p1 + ~ plot(mtcars$mpg, mtcars$disp)
}
https://github.com/thomasp85/patchwork/blob/51a6eff5b71a15da1c04e42aacd111caa6d13041/man/wrap_elements.Rd#L69-L73
This example fails if
gridGraphics
is missing. Should we wrap the whole example in@examplesIf gridGraphics
? Or perhaps it's better to note the requirement more explicitly: