Using data from other programmes PDF Print E-mail

UCINET

If you have your dataset in UCINET, you can export your dataset and calculate the weighted measures in tnet.

First, go to UCINET, and select Data > Export > Raw ...

  • Input dataset: <your dataset>
  • Output format: Edgelist1
  • (edgelist only) Type: directed
  • Minimum tie val allowed: 1
  • Embed row labels: NO
  • Embed column labels: NO
  • Output dataset: c:\data_to_tnet.txt
    (this can be changed, but then you need to changed the entries further down in this example) 

UCINET adds an exclamation mark at the end of each file. So, you must open up c:\data_to_tnet in a text editor, such as Notepad, and delete the last line (this should just be !)

Then, you can open R, and type (note that the \ has become /):

data <- read.table(file="c:/data_to_tnet.txt");

And that's it - your data is now stored as an R-object called data.

To calculate the generalised clustering coefficient, just write:

clustering_w(data);

Pajek

To export your data from Pajek to tnet, you must first save the network in a Pajek .net file, you can do this by going to File > Network > Save, and selecting a location. In this example, I will use c:\data_to_tnet.net

Then you need to open the .net file, e.g. c:\data_to_tnet.net in Notepad as shown on picture to the right:

You need to delete the lines from "*Vertices" to, and including, "*Arcs", so that all you have left is three columns with numbers. Then save the file.

Then, you can open R, and type (note that the \ has become /):

data <- read.table(file="c:/data_to_tnet.net");

And that's it!

Last Updated ( Saturday, 28 November 2009 )