I\'m using the code below:
# Libs require(ggplot2); require(gridExtra); require(grid) # Generate separate charts chrts_list_scts <- list() # Data data(\
you can add a rectGrob to the gtable
grid.draw(gtable::gtable_add_grob(arrangeGrob(g, g, ncol=2), rectGrob(gp=gpar(lwd=5, fill=NA)), 1, 1, 1, 2))
NOTE: fill=NA or fill='transparent' is required otherwise the rectangle can mask the objects below it.
fill=NA
fill='transparent'