magrittr

The magrittr package is a great resource for making R more readable… and more writable. Here’s an example of hard-to-read code print(head(rev(toupper(letters)))) If you came across that in someone else’s code, you might gag. And rightly so. It takes a few moments to work out what’s going on: print the first five characters of the …