renkun-ken / pipeR

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

Multiple symbols to represent piped object #6

Closed renkun-ken closed 10 years ago

renkun-ken commented 10 years ago

In R, . can be directly used in the name of a symbol, but it can also represent other things. For example, . in formula y ~ . represents variables other than y in a data frame. The following expression can be unambiguously evaluated but may be ambiguous to read:

df <- data.frame(x=rnorm(100),y=rnorm(100),z=rnorm(100))
df %>>% lm(z~., data=.)

. in the formula works in correct manner but may look ambiguous. A solution is to allow other variables to represent the piped object too. If lambda expression does not come in, .. may be an easy one.

renkun-ken commented 10 years ago

Issue #7 should solve this problem.