knitr::opts_chunk$set(echo = TRUE)
memer is a a tidyverse
-compatible R
package for creating memes. Mostly wrappers around magick
functions.
# Install the development version from GitHub: # install.packages("devtools") devtools::install_github("sctyner/memer")
library(memer) meme_list()
meme_get("DistractedBf") %>% meme_text_distbf("tidyverse", "new R users", "base R")
meme_get("OprahGiveaway") %>% meme_text_bottom("EVERYONE GETS A %>%!!!", size = 36)
meme_get("AmericanChopper") %>% meme_text_chopper("Stop calling yourself 'just an R user'!", "But I've never written a package!", "So?? You're still an important part of the R community!", "But people who write packages are more important", "NO! All members of the R community are valued & deserve respect!")
meme_get("ExpandingBrain") %>% meme_text_brain("Sharing memes online", "Making your own memes", "Making memes in R", "Using rtweet to share your memes", size = 17)
You can also post memes directly to Twitter. You will need to install the rtweet package for that. Just make sure to set up a Twitter token (see here for more information on that) and you are good to go. The meme_tweet
function also includes the possibility to tag the R Memes for Statistical Fiends account on Twitter for maximum exposure :)
meme_get("DosEquisMan") %>% meme_text_top("I don't always tweet memes", size = 28) %>% meme_text_bottom("But when I do\nI use the memer package in R", size = 26) %>% meme_tweet(tweet_text = "It's dangerous to meme alone. Here take this.", tag_rstatsmemes = T)
knitr::include_graphics("https://i.imgur.com/XvKhZZc.png")
meme_explain()
!Using meme_explain
, you can pass any of the meme names to be taken to their page on knowyourmeme.com.
:warning: :warning: :warning: Content from knowyourmeme.com may be offensive. The authors of memer
have no control over what you may see when using meme_explain()
.
meme_explain("DistractedBf", launch = F, content_warning = T)
> knowyourmeme can contain potentially offensive results, are you sure you want to open it? [Y]es / [N]o:
:warning: :warning: :warning: This is an advanced step. Proceed with caution.
If you want to add your own meme, use memer:::meme_add()
:
inst/extdata
.
a. It should be a .png.
b. It should be small: resolution of 72 and width no more than 500 pixels. meme_add()
as below. setwd("path/to/your/memer") meme_add("Memename", "memefile.png")
memer
as below:devtools::check(document = F) devtools::install()
memer
, submit a pull request! Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.