Closed Wainberg closed 6 months ago
Addressed in S4Arrays 1.2.1 (BioC 3.18, current release) and 1.3.6 (BioC 3.19, devel). See https://github.com/Bioconductor/S4Arrays/commit/59b8f4e28d2273145411f0d5429d1f31f6b79e12 and https://github.com/Bioconductor/S4Arrays/commit/e6498713c2654588d014ea2c052eef7b97a07802.
as.vector(a, mode="integer")
or as.vector(a, mode="complex")
or as.vector(a, mode="raw")
are still misbehaving on Arrow arrays but that's no longer S4Arrays or DelayedArray's fault :wink:
The root cause is that
as.vector()
delegates toas.array()
, andDelayedArray
definesas.array()
for the classArray
:It seems like the designers of
DelayedArray
didn't contemplate that anyone else in the R ecosystem would define a class named"Array"
, so whenever anyone callsas.vector()
on an object with a class named"Array"
(likearrow::Array
), it will useDelayedArray
's implementation.Here's another example that explicitly shows that having a class named
"Array"
is the root cause of the problem: