Meme Generation in R
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
R add http status warning and fix url paste (#2) Jun 20, 2014
inst commit README and example images Jun 16, 2014
.Rbuildignore keep README.Rmd out of R build Jun 16, 2014
.travis.yml switch to native travis-ci R support Apr 25, 2015
NAMESPACE various fixes to plotting Jun 16, 2014
NEWS initial non-working draft Jun 15, 2014
README.Rmd remove imgur opts Jun 16, 2014 remove imgur opts Jun 16, 2014

Meme Generation in R

Build Status

According to Wikipedia:

An Internet meme (/'mi?m/ meem) is an activity, concept, catchphrase or piece of media which spreads, often as mimicry, from person to person via the Internet.

meme is an R package that connects with several online image generators to create internet memes, which can then be loaded into R, plotted, and saved locally.


At some point meme will be available on CRAN and installed from within R from your favorite CRAN mirror:


The latest development version, available here, can be installed directly using Hadley Wickham's devtools package:

if(!require("devtools")) install.packages("devtools")


Here are some simple examples using the package and the default memecaptain generator. To get started, you can grab some image templates from one of the meme generator sites. We'll use memecaptain because it doesn't require a username and password.

templates <- get_templates("memecaptain")

You can use the plot.meme_template method to plot all templates from a given site to help you figure out which one you want to use. Here's some code to do it:

par( mfrow = n2mfrow(length(templates)), mar=rep(0,4), mgp=rep(0,3))
invisible(lapply(templates, plot))

Here are some example memes. These could probably be better, so pull requests are welcome!

plot(allthethings <- create_meme(templates[[2]], "Code", "all the things!"))

plot of chunk allthethings

plot(simply <- create_meme(templates[[10]], "One does not simply", "reshape data from wide to long"))

plot of chunk simply

plot(yuno <- create_meme(templates[[55]], "R CMD check", "y u no work?"))

plot of chunk yuno

u <- ""
plot(grumpy <- create_meme(u, "", "R-help"))
## 'template' is not of class 'meme_template'. Template assumed to be an image URL and meme will be generated with site 'memecaptain'.

plot of chunk grumpy