Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 283b728 + c69f5af commit 77712ccCopy full SHA for 77712cc
pkg/R/Rpipe.R
@@ -41,7 +41,7 @@ Rpipe.prefix.default <- function(e1) {
41
c("Rpipe.", "")
42
}
43
44
-Rpipe.eval <- function(e1, expr) {
+Rpipe.eval <- function(e1, expr, env) {
45
if (as.character(expr[1]) == "(") {
46
do.call(`%|%`, list(e1 = e1, e2 = expr[[2]]))
47
} else if (as.character(expr[1]) == "%|%") {
@@ -63,12 +63,12 @@ Rpipe.eval <- function(e1, expr) {
63
stop(paste("Could not find pipe function", expr[1]))
64
65
do.call(names(func.names)[1],
66
- c(list(e1), as.list(expr[-1])))
+ c(list(e1), as.list(expr[-1])), env=env)
67
68
69
70
`%|%` <- function(e1, e2) {
71
expr <- substitute(e2)
72
- Rpipe.eval(e1, expr)
+ Rpipe.eval(e1, expr, env=parent.frame())
73
74
0 commit comments