Versions‎ > ‎

Version 6.624 | 15 Oct 2016

posted Oct 16, 2016, 5:29 AM by Steve Borgatti   [ updated Oct 16, 2016, 5:30 AM ]
  • Added subgraph command to the CLI. Given a square matrix representing a network and a vector indicating membership of nodes in groups, the subgraph command allows you to extract a subgraph consisting only of nodes belonging to one or more groups. The syntax is <outfile> = subgraph(<input matrix> <attribute vector> <relational operator> <value>). For example:
    ->gender = cols(campattr 1)
    ->boys = subgraph(campnet gender eq 1)
    ->girls = subgraph(campnet gender eq 1)

    If the operator and value are omitted, the program assumes "GT" and "0". For example, if you have a vector of 1s and 0s indicating who is a member of a given component, you could write:

    ->mainweb = subgraph(campnet maincomp)

    This would select all nodes with a value greater than zero on maincomp.