special note for windows users

For windows users, you need to register your font before using it in R graphics (see discussion here).

if (.Platform$OS.type == "windows") {
        Impact = windowsFont("Impact"),
        Courier = windowsFont("Courier")


Call meme to add meme captions:

u <- system.file("angry8.jpg", package="meme")
meme(u, "code", "all the things!")

The grammar of meme

Not that useful, just to mimic ggplot2:

mmplot(u) + mm_caption("calm down", "and RTFM",

meme_save: a meme version of ggsave

The meme output can be saved as an object, and can be exported to file using meme_save. meme_save helps user setting up the output figure aspect ratio and calls ggsave to export the figure:

u2 <- system.file("success.jpg", package="meme")
x <- meme(u2, "please", "tell me more")
outfile <- tempfile(fileext=".png")
meme_save(x, file=outfile)

plot method

Users can plot the meme output and change the caption or other parameters in real time.

plot(x, size = 2, "happy friday!", "wait, sorry, it's monday", color = "firebrick", font = "Courier")