PascalCrepey / HospitalNetwork

Building networks of hospitals through patients transfers
https://pascalcrepey.github.io/HospitalNetwork/
GNU General Public License v3.0
7 stars 7 forks source link

Hospitals with no transfers get silently dropped #23

Open MikeLydeamore opened 4 years ago

MikeLydeamore commented 4 years ago

Not sure if this qualifies as a bug or not, but if there are hospitals present in the database that have admissions but no transfers, they are silently dropped from the transfer matrix. I'd expect a row (and column) of zeroes by default so that the same nodes are present in all elements of the hospinet object.

PascalCrepey commented 4 years ago

Thanks a lot Mike for spotting this, to me it sounds like a non-desirable feature, so let's call it a bug ;-). I think it may raises several issues regarding comparability of networks. Thanks to the new interface (and the package itself), it becomes much easier to build several kind of network from the same dataset, and I suspect that having to deal with different sizes of matrices will not help things... At one point in the code we ensure that the matrix is square, I suspect that's where some hospitals are dropped... Feel free to do a PR if you have time to fix this, as long as you add a test as well ;-)