The adblockr package: block ads from the monetizr package

April 1, 2016

(This article was first published on Variance Explained, and kindly contributed to R-bloggers)

I was horrified to learn of the existence of the monetizr package, which adds advertisements to R functions. The package goes against the entire philosophy of open source and the spirit of the R community.

Luckily, I was able to construct a fix- the adblockr package.

Use freely to get an ad-free experience

For example, imagine someone locked the useful multiply_by_two function behind an annoying ad:


multiply_by_two <- function(x) {
  x * 2

multiply_by_two <- marketably(multiply_by_two,
                              "This is an awful, distracting ad")

## This is an awful, distracting ad
## [1] 20

The adblockr package offers the freely adverb, which converts the multiply_by_two function back to give you an ad-free experience:


multiply_by_two <- freely(multiply_by_two)
## [1] 10

The package also includes the block_all function for removing all ads from a package. For example, once the next version of broom is monetized, you can block all ads in the package with:



If enough of us use this, it will hopefully send a message to the greedy monetizr maintainer that ads have no place in R.

To leave a comment for the author, please follow the link and comment on their blog: Variance Explained. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)