1

This works fine:

library(zeallot)
c(v1, v2, v3) %<-% list(10, 20, 30)

This does not:

library(zeallot)
library(future)
c(v1, v2, v3) %<-% list(10, 20, 30)

because future overrides zeallot's parallel assignment operator.

The following objects are masked from ‘package:zeallot’:

    %->%, %<-%

Does this mean it is not possible to use zeallot with future?

ixodid
  • 2,180
  • 1
  • 19
  • 46

1 Answers1

3

I see two options.

  1. Ensure that zealot's %<-% takes precedence by loading zealot last.

    library(future)
    library(zeallot)
    c(v1, v2, v3) %<-% list(10, 20, 30)
    
  2. Use explicit namespace calling when using %<-% in functional (not infix) form.

    library(zeallot)
    library(future)
    zeallot::`%<-%`(c(v1, v2, v3), list(10, 20, 30))
    
Maurits Evers
  • 49,617
  • 4
  • 47
  • 68
  • You can use the `exclude` option in `library` as well `library(future, exclude = c("%->%", "%<-%")); c(v1, v2, v3) %<-% list(10, 20, 30)` – akrun Jun 07 '22 at 17:16