-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: evaluate Series
methods in the correct environment
#973
Conversation
I was researching this as well. Please see this SO answer. As an important correction, we need to use f <- function(x, ..., y = 0) {x + y}
g1 <- function(x, y) {do.call(f, as.list(match.call()[-1]), envir = parent.frame())}
h1 <- function() {a <- 100; g1(1, a)}
g2 <- function(x, y) {do.call(f, as.list(sys.call()[-1]), envir = parent.frame())}
h2 <- function() {a <- 100; g2(1, a)}
h1()
#> [1] 101
h2()
#> [1] 1 Created on 2024-03-27 with reprex v2.1.0 |
Seems like we use Otherwise, I think this is good to go, failures are due to some CI stuff |
I looked at it and it probably does not need to be updated. I am thinking about tests that should be added. Once the tests are added, I merge this. |
"over", | ||
"rolling", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed these as they are not directly related to this PR, but obviously they do not work on the Series.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failure is unrelated to this change.
Close #970