Open vixr opened 9 years ago
Using arithmetic operators in function form (e.g. *) causes an error when used in conjunction with dplyr pipes and lambda.r. See example below:
*
require(dplyr) require(lambda.r) ## works foo1(bar) %as% { bar * 2 } ## works foo2(bar) %as% { `*`(bar, 2) } ## works foo3 <- function(bar) { bar %>% `*`(2) } ## error - "Error in parse(text = text) ... unexpected '*'" foo4(bar) %as% { bar %>% `*`(2) }
EDIT: this seems to be specific to multiplication; addition + works
+
Using arithmetic operators in function form (e.g.
*
) causes an error when used in conjunction with dplyr pipes and lambda.r. See example below:EDIT: this seems to be specific to multiplication; addition
+
works