-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
This happens when attaching one of my packages :
library(conflicted)
library(inops)
#> Error: `fn` must be an R function, not a primitive functionThe package can be attached without problem if conflicted is not attached.
library(inops)
#>
#> Attaching package: 'inops'
#> The following object is masked from 'package:base':
#>
#> <<-It appears to come from the fact that the package overrides a primitive (namely <<-).
library(conflicted) triggers conflicted:::.onAttach(), which calls conflicted:::conflicts_register(), which calls conflicted:::is_superset() and rlang::fn_fmls() is called, and chokes on primitives because they have no formals.
If I call library() twice then I have no error and can use the package, including <<- :
library(conflicted)
library(inops)
#> Error: `fn` must be an R function, not a primitive function
library(inops)
2 %in[]% c(1,3)
#> [1] TRUE
x <- 1:4
x < 3 <- 0
x
#> [1] 0 0 3 4library(conflicted) will be the one failing if it's called second :
library(inops)
#>
#> Attaching package: 'inops'
#> The following object is masked from 'package:base':
#>
#> <<-
library(conflicted)
#> Error: package or namespace load failed for 'conflicted':
#> .onAttach failed in attachNamespace() for 'conflicted', details:
#> call: NULL
#> error: `fn` must be an R function, not a primitive functionirenetlv, RoelVerbelen and nir4most
Metadata
Metadata
Assignees
Labels
No labels