I’m interested if there’s a package in R to support call-chain style data manipulation, like in C#/LINQ, F#?
I want to enable style like this:
var list = new[] {1,5,10,12,1};
var newList = list
.Where(x => x > 5)
.GroupBy(x => x%2)
.OrderBy(x => x.Key.ToString())
.Select(x => "Group: " + x.Key)
.ToArray();
I don’t know of one, but here’s the start of what it could look like:
This prints
If you keep using hacks like that it should be pretty simple to get the kind of
syntax you find pleasing 😉
edit: combined with
plyr, this becomes not bad at all: