You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake"
g <- function(x) {
x <- 10
y <- 10
UseMethod("g")
}
g.default <- function(x) c(x = x, y = y)
x <- 1
y <- 1
g(x)
x y
1 10
Same code and variables under R version 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup"
g(x)
y
1 1
The text was updated successfully, but these errors were encountered:
R NEWS stated this change effective for version 4.4.0
"UseMethod() no longer forwards local variables assigned in the generic function into method call environments before evaluating the method body. This makes method calls behave more like standard function calls and makes method code easier to analyze correctly."
R version 4.3.3 (2024-02-29 ucrt) -- "Angel Food Cake"
g <- function(x) {
x <- 10
y <- 10
UseMethod("g")
}
g.default <- function(x) c(x = x, y = y)
x <- 1
y <- 1
g(x)
x y
1 10
Same code and variables under R version 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup"
g(x)
y
1 1
The text was updated successfully, but these errors were encountered: