Skip to content

Error in Group 1 labels #11

Open
Open

Description

@zalmquist

Per a question from Giacomo, ETCH I notice that the group labels have a small error,

The group labels should be (for vertex.names -- NOT the order of the vertices)

group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54)
group2<-c(9, 10, 14, 15, 20, 21, 23:27, 29, 32, 33, 41:45, 49, 52)

It looks like 16:19 in Group 1 was dropped.

Thanks!

Zack

Activity

  1. zalmquist commented on Feb 14, 2022

    @zalmquist
    Author

    It looks like it is in both formats of the data. Not sure what happened.

  2. mbojan commented on Feb 18, 2022

    @mbojan
    Member

    Does this apply to the windsurfers data?

  3. zalmquist commented on Feb 18, 2022

    @zalmquist
    Author
  4. skyebend commented on Feb 18, 2022

    @skyebend
    Contributor

    Hi Zach, I'm sorry I'm not up to speed on context here, looks like 16:19 is on the list for group 1?

  5. zalmquist commented on Feb 18, 2022

    @zalmquist
    Author
  6. giava90 commented on Mar 15, 2022

    @giava90

    Hi,
    I have noticed that the vertex.names match the "order of the vertices":

    library(networkDynamic)
    data("windsurfers")
    a<-c(); for (i in 1:95){if(i!=windsurfers$val[[i]]$vertex.names) {a<-c(a,windsurfers$val[[i]]$vertex.names)}}; a
    # NULL
    

    Also that the nodes 16:18 are flagged as in group1, but 19 and many others are missing:

    group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54)
    a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group1==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}};intersect(a, group1)
    # [1]  1  2 16 17 18 39 40
    

    Could it be possible that indices and vertex.names have gotten mixed up somewhere?
    I hope this helps to clarify the problem.

    Best,
    Giacomo

    Some code to reproduce the issue:

    library(networkDynamic)
    data("windsurfers")
    a<-c();for (i in 1:95){a<-c(a,windsurfers$val[[i]]$group1)}; sum(a)
    # [1] 18   The output should be 22
    group1<-c(1:8,13, 16:19, 22, 28, 37, 39, 40, 46, 47, 51, 54)
    a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group1==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}}; length(intersect(a, group1))
    # [1] 7 The output should be 22
    group2 <-c(9, 10, 14, 15, 20, 21, 23:27, 29, 32, 33, 41:45, 49, 52)
    a<-c();for (i in 1:95){if(windsurfers$val[[i]]$group2==1) {a<-c(a,windsurfers$val[[i]]$vertex.names)}};length(intersect(a, group2))
    # [1] 9  The output should be 21
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions