pipeR icon indicating copy to clipboard operation
pipeR copied to clipboard

Pipe()

Open ggrothendieck opened this issue 9 years ago • 2 comments

It would be nice if this:

Pipe(mtcars) $ dim()

could be written like this (syntax could vary but hopefully this gives the idea of avoiding having to put the input within parentheses):

Pipe() $ mtcars $ dim()

ggrothendieck avatar Jan 31 '16 14:01 ggrothendieck

In Pipe(x)$f, $ always returns a closure assuming f is a function that can be get() from the evaluation environment to its parents. Pipe()$mtcars will inconsistently return a data object, which may produce more ambiguity. I'm not sure if it's possible or whether it's a good idea.

renkun-ken avatar Jan 31 '16 15:01 renkun-ken

As mentioned it would not have to be Pipe() $ x $ .... It could start with startPipe() $ x $ ..., say. IMHO this would be easier to read than Pipe(x) $ ...

ggrothendieck avatar Jan 31 '16 15:01 ggrothendieck