grimbough / rhdf5

Package providing an interface between HDF5 and R
http://bioconductor.org/packages/rhdf5
60 stars 21 forks source link

Subsetting does not understand drop=FALSE argument #68

Open mschubert opened 4 years ago

mschubert commented 4 years ago

Consider the following example:

fname = "/path/to/my.gctx"
file = rhdf5::H5Fopen(fname)
data = file&"/0/DATA/0/matrix"
data[1, 1:5] # works, but coerces the matrix to a vector
data[1, 1:5, drop=FALSE] # Error: length of index has to be equal to dimensional extension of HDF5 dataset.

This is using the current Github HEAD of rhdf5.

Shouldn't the drop argument behave the same way as when subsetting a normal matrix?