epicontacts
epicontacts copied to clipboard
Bug in subset(x cs_min = ...)
Using this as a placeholder as I cannot share the data leading to the issue and cannot come up with a MRE. When doing plot(subset(x, cs_min = 5))
I end up with a cluster of size 3. Seems to come from NA
s in some of the meta-data used for plotting nodes / edge properties. Maybe a cursory look through the subset
code with attention to handling of NA
s will reveal the issue.
Hi @thibautjombart , subset_clusters_by_size()
doesn't look into NA
s, so I'm not sure if that's causing the bug. I added some more checks in the function - if the minimum network cluster size is lesser than specified cs_min
it'll stop instead of returning the same network (and a similar check for cs_max
and cs
). They might help you pinpoint the issue. I should have thought of this scenario earlier!
Ref issue_97 branch