syberia / mungebits2

Atomic production-ready data preparation in R
MIT License
3 stars 2 forks source link

Handle gracefully case where default train arguments conflicts with an expression passed in the ... #5

Closed robertzk closed 9 years ago

robertzk commented 9 years ago
mb <- mungebit$new(function(data, x, y) { print(x); print(y); data })
mp <- mungepiece$new(mb, list(x = 2))
x <- 3
mp$run(iris, y = x) -> iris2 # Will incorrectly say y is 2!
robertzk commented 9 years ago

Fixed by replacing x with _x in the hidden train args environment.

kirillseva commented 9 years ago

Oh, nice catch!