how to add hyperlink to title in ggplot R?

I am wondering how to make a title in blue and clickable in ggplot2?

library(ggplot2)
library(htmltools)
p <- ggplot(mpg, aes(displ, hwy, colour = class)) + 
  geom_point() + 
  labs(title = tags$a("ggplot2 Package", href = "https://ggplot2.tidyverse.org/"))

ggsave(filename = "test.pdf",
         plot = p,
         device = cairo_pdf,
         dpi = 500)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.