patchwork
patchwork copied to clipboard
Provide a generic for plots to generate patchwork-compliant tables
FYI: it doesn't seem possible to put a gridExtra::tableGrob(...) as the first element in the list of plots?
p1 <- ggplot(mtcars) +
geom_point(aes(mpg, disp)) +
ggtitle('Plot 1')
gridExtra::tableGrob(mtcars[1:10, c('mpg', 'disp')]) + p1
@baderstine thanks! this is actually a life saver :)
no, you generally have to wrap elements in wrap_elements() if they appear as the first due to how R's operator dispatch works