| edgel | R Documentation |
A function to read edge lists as objects or files with a ‘sender-receiver-tie’ format representing multiplex networks and to transform edge-lists into three-dimensional arrays.
edgel(x, toarray = TRUE, header = TRUE, sep = "\t", valued = FALSE, inc = FALSE,
rownames = TRUE, add = NULL, na.rm)
x |
Object or file representing network data. |
toarray |
(logical) Transform edge-list in |
header |
(optional and logical) Does edge-list in file |
sep |
(default horizontal tab) Separator between edge-list columns. |
valued |
(logical, for |
inc |
(optional and logical) Is |
rownames |
(optional and logical, for |
add |
(optional) Vector with isolate labels to add to the output. |
na.rm |
(optional and logical) Remove |
The edgel function reads edge lists in ‘sender-receiver-tie’ format as a data frame
with at least two columns for sender and receiver, plus one column for each relation type in a multiplex network.
For simple networks, two columns for sender and receiver are sufficient.
The input in x may also be a file containing tabular data, where the separator and header are specified with sep and header.
The inc option is used for incidence matrices with actors or objects and self-ties in data frames,
which are relevant for two-mode data and analyses such as Galois transformations between partite sets.
Incidence matrices can be converted into diagonal matrices for further analysis.
When toarray is set to FALSE, argument rownames can be used to move labels between row names and the first column.
Additional options make it possible to remove missing values with na.rm, add isolated nodes with add,
and choose between dichotomizing or preserving values in networks with valued.
By default the outcome is an array that for multiple networks is a three dimensions of stacked matrices where the relation types are placed.
However, if toarray is set to FALSE, then the edge-list with a data frame format is returned.
warning messages for missing information, with the tranformation type, and when ‘one type of relation assumed’ in x.
For backwards compatibility, an alias for this fuction is read.srt.
write.edgel, galois, read.gml, read.dl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.