read.srt: Read edgelist ('srt') files

read.srtR Documentation

Read edgelist (srt) files

Description

A function to read edgelist files with a send, receive, and ties format to make a three-dimensional array.

Usage

read.srt(file, header = TRUE, sep = "\t", toarray = TRUE, dichot = FALSE, 
    attr = FALSE, rownames = FALSE, add = NULL) 

Arguments

file

path to the file

header

(logical) does the file has a header?

sep

the separator among the columns (default is horizontal tab)

toarray

(logical) should the data frame be transformed to arrays?

dichot

(logical) should the data be dichotomized?

attr

(logical) whether or not the file corresponds to attribute-based data

rownames

(logical) are rownames the labels of the nodes?

add

(optional) isolates to be added to the network

Details

srt stands for send, receive, and ties, and it is a data frame with at least 2 columns for the send, receive, and the ties for a multivariate network, with one column for each type of relation. However, the attr option corresponds to an actor and self-ties data frame file with the option to transform it into a diagonal matrix. When option toarray is set to FALSE, options attr and rownames allow placing the first column of the data frame as the name of the table, which is the format of two-mode data, and compute for instance Galois transformations among the partite sets. If more than one isolate is added, then the data must be included as a vector.

It is also possible to treat the input data as data frame object and manipulate it via e.g. the subset function with the toarray option.

Value

By default an array; usually with three dimensions of stacked matrices where the multiple relations are placed. If toarray = FALSE, then the data frame is given.

Note

The function supports valued networks as well.

Author(s)

Antonio Rivero Ostoic

See Also

write.srt, read.gml, read.dl, galois


mplex/multiplex documentation built on April 9, 2024, 3:12 a.m.