moodymudskipper / nakedpipe

Pipe Into a Sequence of Calls Without Repeating the Pipe Symbol.
69 stars 7 forks source link

addin to change expression to piped expression #31

Open moodymudskipper opened 3 years ago

moodymudskipper commented 3 years ago

so dim(head(iris, 2)) will be changed to :

iris %.% {
  head(., 2)
  dim()
}

I often start to nest function calls until I realize that a pipeline would be better, then it's some work to reformat it, we could do it very easily.

It wouldn't work both ways, because of special features of {nakedpipe}. The work that we did to translate to magrittr could be leveraged here in principle but it's a can of worms and not that useful so I'd rather not create technical debt.