integer.edgelist {linkcomm} | R Documentation |
Convert A Network to an Integer Edgelist
Description
This function converts a character string edgelist into an integer edgelist.
Usage
integer.edgelist(network)
Arguments
network |
An edge list, which is a matrix or data frame with 2 or 3 columns. The first 2 columns contain the nodes that interact with each other, which can be character strings or integer values. The optional third column is a numerical vector of weights for each edge, which is stripped from the output. |
Value
A list containing the following components:
edges |
A matrix with two columns containing the integer edgelist. |
nodes |
A named integer vector mapping node integer IDs to their character string equivalents. |
Author(s)
Alex T. Kalinka alex.t.kalinka@gmail.com
See Also
Examples
## Generate graph and convert into an integer edgelist.
g <- data.frame(letters[1:10],letters[6:15])
gi <- integer.edgelist(g)
[Package linkcomm version 1.0-14 Index]