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
Passing any .options causes all arguments to foreach() to be evaluated eagerly in a context where that may not be appropriate:
library(foreach)
foreach(i=1:3) %:% foreach(j=i:3, .options.foo="bar") %do% seq(i, j) |> str()
#> Error in eval(expr, envir, enclos): object 'i' not found
# Expected result
foreach(i=1:3) %:% foreach(j=i:3) %do% seq(i, j) |> str()
#> List of 3#> $ :List of 3#> ..$ : int 1#> ..$ : int [1:2] 1 2#> ..$ : int [1:3] 1 2 3#> $ :List of 2#> ..$ : int 2#> ..$ : int [1:2] 2 3#> $ :List of 1#> ..$ : int 3