talegari / bigdist

Store Distance Matrices on Disk:
https://talegari.github.io/bigdist/
4 stars 2 forks source link

bigdist_subset fails for last index #3

Closed pstahlhofen closed 3 years ago

pstahlhofen commented 4 years ago

If you have a bigdist-object created as follows:

D = as_bigdist(dist(c(1:12)), file='somefile')

and you try to create a subset including the last row...

D_sub = bigdist_subset(D, 10:12, file='subset_file')

you will get an error:

max(index) not less than sz

I assume that one would just have to replace a '<' by a '<=' somewhere in the code in order to fix this

talegari commented 3 years ago

https://github.com/talegari/bigdist/commit/a7f8365f40cd8e61a4a471cfd15699b00dfd8b38