Learn R Programming

sna (version 0.41)

read.nos: Read (N)eo-(O)rg(S)tat Input Files

Description

Reads an input file in NOS format, returning the result as a graph stack.

Usage

read.nos(file)

Arguments

file
The file to be imported

Value

  • The imported graph stack

Details

NOS format consists of three header lines, followed by a whitespace delimited stack of raw adjacency matrices; the format is not particularly elegant, but turns up in certain legacy applications (mostly at CMU). read.nos provides a quick and dirty way of reading in these files, without the headache of messing with read.table settings.

The content of the NOS format is as follows:

... ...

...

...

...

...

...

...

...

...

...

where is understood to be the value of the c->d edge in the bth graph of the file. (As one might expect, m, n, and o are the numbers of graphs (matrices), rows, and columns for the data, respectively.) The "k" line contains a list of row and column "colors", categorical variables associated with each row and column, respectively. Although originally intended to communicate exchangability information, these can be used for other purposes (though there are easier ways to deal with attribute data these days).

See Also

scan, read.table