Ответ, на который вы ссылаетесь, содержит все ингредиенты,
library(ggplot2)
library(grid)
library(dplyr)
library(gtable)
lg <- textGrob(label = "\uA9", x = unit(0, "npc"), just = "left")
rg <- textGrob(label = "My fabulous company, 2019", x = unit(0, "npc"), just = "left")
mg <- png::readPNG(system.file("img", "Rlogo.png", package="png")) %>%
rasterGrob(interpolate = TRUE, height = grobHeight(rg))
p <- ggplot(mtcars, aes(wt, mpg)) +
geom_point() +
labs(caption="") # to create space for title
# convert to grob
gt <- ggplotGrob(p)
# create new title as a tableGrob with separate cells for image & text
new.title <- gtable_row('caption', grobs = list(lg,mg,rg),
widths = unit.c(grobWidth(lg), grobWidth(mg), unit(1,"null")),
height=unit(1,"null")) %>%
# optional: adda fixed amt of space between image & text
gtable_add_col_space(width = unit(5, "pt"))
# assign new title back to gt
gt$grobs[[which(gt$layout$name == "caption")]] <- new.title
grid.newpage()
grid.draw(gt)