https://github.com/dgrtwo/adblockr
Block ads from the monetizr package
https://github.com/dgrtwo/adblockr
Last synced: 8 months ago
JSON representation
Block ads from the monetizr package
- Host: GitHub
- URL: https://github.com/dgrtwo/adblockr
- Owner: dgrtwo
- License: other
- Created: 2016-04-01T19:38:38.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-01T19:55:27.000Z (about 10 years ago)
- Last Synced: 2025-10-13T20:03:49.032Z (8 months ago)
- Language: R
- Size: 3.91 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
### adblockr: Block ads created by the monetizr package
I was horrified to learn of the existence of the [monetizr package](http://varianceexplained.org/r/monetizr/), which adds advertisements to R functions:
```{r}
library(monetizr)
multiply_by_two <- function(x) {
x * 2
}
multiply_by_two <- marketably(multiply_by_two,
"This is an awful, distracting ad")
multiply_by_two(10)
```
The adblockr package offers the `freely` adverb, which converts the `multiply_by_two` function back to give you an ad-free experience:
```{r}
library(adblockr)
multiply_by_two <- freely(multiply_by_two)
multiply_by_two(5)
```
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:
```{r eval = FALSE}
library(broom)
block_all("broom")
```