+01 (770) 784 8511

My blog

Impress Your Friends with Custom Memes in R

Impress Your Friends with Custom Memes in R

Author : Christopher Blake

In my constant pursuit of meme-worthy content to demonstrate how hip I am to students, I stumbled across the meme package in R. The documentation is pretty sparse, but the jist is that it makes it easy-to-create custom memes with minimal commands in R. To my students, I know I will be using the package to make terrible jokes, but it could also be a neat way to show of your R skills to your peers. You can find an example of how to use the package here: https://www.r-bloggers.com/2020/11/create-bart-simpson-blackboard-memes-with-r/#google_vignette. Happy meme-ing (and make sure not to create them during class)!

I created the above meme using the following code, for reference:

pacman::p_load(meme)

if (.Platform$OS.type == "windows") {
  windowsFonts(Comic = windowsFont("Comic Sans MS"))
}
bart <- "PATH\\bart_simpson_chalkboard-5157.gif" # source: http://free-extras.com/images/bart_simpson_chalkboard-5157.htm

text <- "I will not make memes in R during class."
text <- paste(rep(text,8),collapse = "\n")
text <- paste0("\n",text)

bartMeme <- meme(bart,
     text,
     size = 1,
     font = "Comic",
     vjust = 0,
     r = 0)

meme_save(bartMeme,
        file = "PATH\\bartR.png")

Tags

Teaching
R

Latest Post

Teaching , Student Work , Dooley Dose of Economics / 1 week ago

Introducing: Dooley Dose of Economics ...

Read More
Teaching , Useful R Finds / 5 months ago

R to Python: Resources for Students Transitioning Languages in Econometrics ...

Read More

Older posts

How to College: 14 Tips for Students Entering College
How to College: 14 Tips for Students Entering College ...
Equity in Education: An Analysis of China’s “Double Reduction” Policy from a Utopian Socialist Perspective
Equity in Education: An Analysis of China’s “Double Reduction” Policy ...