renkun-ken / pipeR

Multi-Paradigm Pipeline Implementation
Other
169 stars 39 forks source link

Does not support piping with lhs value unevaluated #55

Closed renkun-ken closed 10 years ago

renkun-ken commented 10 years ago

The current implementation forces to evaluate the lhs value and thus does not support first-argument piping with lhs unevaluated.

> library(pipeR)
> (mpg > mean(mpg)) %>>% subset(x = mtcars)
Error in eval(as.call(c(fun[1L], quote(.), fun[-1L])), envir = list(. = x),  : 
  object 'mpg' not found
> (mpg) %>>% with(data = mtcars)
Error in eval(as.call(c(fun[1L], quote(.), fun[-1L])), envir = list(. = x),  : 
  object 'mpg' not found
> mpg %>>% (with(mtcars,.))
Error in eval(expr, list(. = .), envir) : object 'mpg' not found
> (mpg > mean(mpg)) %>>% (subset(mtcars,.))
Error in eval(expr, list(. = .), envir) : object 'mpg' not found