Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty handling of NA in get_clusters #118

Open
finlaycampbell opened this issue Jan 21, 2020 · 0 comments
Open

Faulty handling of NA in get_clusters #118

finlaycampbell opened this issue Jan 21, 2020 · 0 comments

Comments

@finlaycampbell
Copy link
Collaborator

NA in contact IDs is treated as a single node, resulting in incorrect clustering.

In the example below, 1 -> NA and NA -> 2 is interpreted as a single cluster, when really these NA nodes are most likely different:

> net <- make_epicontacts(data.frame(id = 1:2),
+                         data.frame(from = c(1, NA),
+                                    to = c(NA, 2)))

> get_clusters(net)$linelist
  id cluster_member cluster_size
1  1              1            3
2  2              1            3
3 NA              1            3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant