Reputation: 11
Using listParts() from the partitions package immediately causes R and RStudio to crash, no matter the input. Below is a reproducible example and traceback with error message. I'm running R 4.2.0 GUI 1.78 High Sierra build and RStudio 2022.2.3.492 on macOS Monterey 12.2.1. The function runs fine on my coworker's PC. Any help appreciated!
> library(partitions)
> myVec <- c(1:3)
> partitions::listParts(length(myVec))
*** caught illegal operation ***
address 0x119c1cbfe, cause 'illegal opcode'
Traceback:
1: as.bigz(1)
2: .fac(sum(x))
3: setparts(x)
4: partitions::listParts(myVec)
Upvotes: 1
Views: 54
Reputation: 61
Not sure what is going on here; the partitions package is only used to evaluate listParts(3), and this is straightforward:
listParts(3) [[1]] [1] (1,2,3)
[[2]] [1] (1,3)(2)
[[3]] [1] (1,2)(3)
[[4]] [1] (2,3)(1)
[[5]] [1] (1)(2)(3)
The error comes from as.bigz(), part of the gmp package. I would suggest using R --vanilla, and finding a minimal example that does not use partitions and reporting it to the gmp maintainer. Best wishes, Robin
Upvotes: 2