Description Usage Arguments Value Examples
Maps edgelist to adjacency matrix
1 2 3 4 5 6 7 8 9 10 11 |
edge.list |
dataframe containing a (weighted) edgelist. |
select_cols |
optional vector of 3 (2 for multi-graphs) elements
specifying which columns are the source,target, and attributes from which
building the graph. Otherwise Column 1 is assumed to be the source, column
2 the target, column 3 the attribute. In the case of multi-graphs, the
third element is not needed and the number of edges between each pair of
vertices is computed according to ' |
multiedge |
boolean, are there multiple edges? defaults to FALSE. |
aggr_expression |
string, the expression used to compute the aggregated
value in the adjacency matrix in the presence of multiedges. It defaults to
' |
nodes |
optional vector containing all node names in case disconnected nodes should be included. |
sparse |
boolean, return sparse matrix? default to TRUE |
drop_names |
boolean, drop names from matrix and return a vector of names together with the matrix. This option saves considerable memory when dealing with graphs with long node names. |
directed |
boolean, optional parameter, if FALSE, forces to undirected upper triangular adjacency matrix |
selfloops |
boolean, optional parameter, if ignores selfloops. |
the (weighted) adjacency matrix corresponding the edgelist passed. If 'drop_names' is TRUE, returns a list with the adjacency matrix and a vector with node names.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.