see #5685
Are there any ways to walk around this?
r$> mtDT <- setDT(copy(mtcars))
mtDT[, .(plot = list(ggplot(data = .SD) + geom_point(aes(x=wt, y=mpg)))), by=.(carb,am)][,
.(list(patchwork::wrap_plots(plot))), by=am]
Error in `X[[i]]`:
! Index out of bounds
Run `rlang::last_trace()` to see where the error occurred.
r$> rlang::last_trace(drop = FALSE)
<error/rlang_error>
Error in `X[[i]]`:
! Index out of bounds
---
Backtrace:
x
1. +-...[]
2. \-data.table:::`[.data.table`(...)
3. \-data.table (local) runlock(ans)
4. \-base::lapply(x, runlock, current_depth = current_depth + 1L)
5. \-data.table (local) FUN(X[[i]], ...)
6. \-base::lapply(x, runlock, current_depth = current_depth + 1L)
7. \-data.table (local) FUN(X[[i]], ...)
8. \-base::lapply(x, runlock, current_depth = current_depth + 1L)
9. +-X[[i]]
10. \-patchwork:::`[[.patchwork`(X, i)
11. \-cli::cli_abort("Index out of bounds")
12. \-rlang::abort(...)
see #5685
Are there any ways to walk around this?