futureverse / futureverse/globals
Are the packages of S3 methods being found?
- Dominant language
- R
- Stars
- 29
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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:
``` r
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](https://reprex.tidyverse.org) (v0.2.1)
Here are the two issues:
https://github.com/DavisVaughan/furrr/issues/72
https://github.com/DavisVaughan/furrr/issues/73
Contributor guide
Assessment
This issue has not been assessed yet.