Deep thoughts and gists
by Paweł Piątkowski

Minimalist pipe operator for R

This is an extremely simplified version of pipe operator (%>%) known from magrittr and dplyr.

The pipe operator allows you to write complex expressions like this:

table(strsplit(gsub("[^a-z]", "", tolower(string)), ""))

in a much more intuitive form:

string %>%
  tolower() %>%
  gsub(pattern = "[^a-z]", replacement = "") %>%
  strsplit(split = "") %>%

making your code much cleaner and legible.