Closed renkun-ken closed 10 years ago
I(x) provides a mechanism for meta piping, that is, evaluate the expression in I() first and put the result to ... in x %>>% (...).
I(x)
I()
...
x %>>% (...)
> formula1 <- x ~ x + 2 > formula2 <- x ~ x * 2 > 1:10 %>>% I(if(mean(.) >= 5) formula1 else formula2) [1] 3 4 5 6 7 8 9 10 11 12
Therefore, the current implementation of I() is not enough. Use pipe_dot() in I().
pipe_dot()
I(x)
provides a mechanism for meta piping, that is, evaluate the expression inI()
first and put the result to...
inx %>>% (...)
.Therefore, the current implementation of
I()
is not enough. Usepipe_dot()
inI()
.