Data used by tnet PDF Print E-mail

tnet uses three types of data:

  1. weighted data
  2. two-mode data
  3. longitudinal data

All these types of data can be read into R by using the read.table-function.

For now, vertex labels other than integers are not allowed, i.e. the vertices must be named 1, 2, 3, etc.

ImageWeighted data must have the following format:

  1 2 4
  1 3 2

where the first column is the sending vertex's id, the second column is the receiving vertex's id, and the third column is the weight of that particular tie. If your data only consists of the sender and receiver column, and duplicate entries are the indication of weights, then have a look at the shrink_to_weighted_network-function. This function would create the correct format from your data.

ImageFor undirected networks, two entries must be included for each edge:

  1 2 4
  2 1 4
  1 3 2
  3 1 2

If your data does not have two entries per edge, but only one, then have a look at the symmetrise-function as this will create the correct format from your data.

Two-mode data must have the following format (binary network):

  1 1
  1 2
2 1
2 3

where the first column is the main vertex set's ids and the second column is the second vertex set's ids.

Two-mode networks can also be weighted, in this case, a third column can be appended to the edgelist with the weight of the ties.

Longitudinal data must have the following format:

Image  "2007-09-12 13:44:12" 1 1 1
  "2007-09-12 13:44:32" 2 2 1
  "2007-09-12 13:46:00" 1 2 1
"2007-09-12 13:46:31" 1 2 1
  "2007-09-12 13:47:54" 1 2 1
  "2007-09-12 13:48:21" 1 2 1
  "2007-09-12 13:49:27" 1 2 1
  "2007-09-12 13:58:14" 1 2 -1
  "2007-09-12 13:58:16" 3 3 1
  "2007-09-12 13:52:17" 1 3 1
  "2007-09-12 13:56:59" 1 3 1

where the first column is a MySQL-timestamp surrounded by quotes, the second column is the sending vertex's id, the third column is the receiving vertex's id, and the fourth column is the weight of that particular connection (for now, this must be 1 or -1 for most functions). As soon as you have it in the above format, you can use the read.table-function in the same way as mentioed above.

If your data is not in this format, you can use the as.longitudinal-function to fix some of the issues.

Last Updated ( Saturday, 13 June 2009 )