Skip to content

Grouping "linked" points

3 messages · mattc0, Thomas Pengo, Ben Madin

#
Matthew,

You might want to look at the graphing packages for this - network, sna, igraph will all help you. What you are describing is probably best thought of as an edgelist, so if using a function such as as.network() you may need to specify that it is 'edgelist'.

example code might look like : (note I'm using a data frame for your data, and the id (row name) will become the vertex.names attribute)
Classes for Relational Data
Version      1.7 created on      July 7, 2011.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of Washington
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
For citation information, type citation("network").
Type help("network-package") to get started.
[1] "na"           "vertex.names"
[1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
cheers

Ben
On 05/08/2011, at 1:51 PM, mattc0 wrote: