Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInfinite recursion after grouped objects are returned unlocked #4173
Comments
|
Here is another example more suited for unit tests: f = function(data) {
x = new.env()
x$a = 2
x$b = x
x
}
dt = data.table(x = rep(1:3, each = 3), y = runif(9))
dt[, list(evaluated = list(f(copy(.SD)))), by = x] |
11ab05a introduced an infinite recursion:
Background: we are creating R6 objects (basically environments) from grouped subsets of the data. Some of these objects have references to each other (c.f. https://github.com/mlr-org/mlr3/blob/master/R/BenchmarkResult.R#L226).