I've had two reports over in furrr where packages are not loaded because the only thing used in the expression are S3 generics where the generic doesn't come from the package, but the method does (for example, [ is in base R, but [.data.table is in data table). Does globals find these?
Here is an example:
library(data.table)
library(future.apply)
#> Loading required package: future
dt_cars <- data.table(mtcars)
plan(multiprocess, workers = 2)
future_lapply(1:4, function(x) {head(dt_cars[carb %in% 1], 2)})
#> Error in carb %in% 1: object 'carb' not found
future_lapply(1:4, function(x) {library(data.table); head(dt_cars[carb %in% 1], 2)})
#> [[1]]
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> 1: 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 2: 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#>
#> [[2]]
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> 1: 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 2: 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#>
#> [[3]]
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> 1: 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 2: 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#>
#> [[4]]
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> 1: 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 2: 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Created on 2019-06-11 by the reprex package (v0.2.1)
Here are the two issues:
futureverse/furrr#72
futureverse/furrr#73
I've had two reports over in furrr where packages are not loaded because the only thing used in the expression are S3 generics where the generic doesn't come from the package, but the method does (for example,
[is in base R, but[.data.tableis in data table). Doesglobalsfind these?Here is an example:
Created on 2019-06-11 by the reprex package (v0.2.1)
Here are the two issues:
futureverse/furrr#72
futureverse/furrr#73