get.incidence: Bipartite adjacency matrix of a bipartite graph

View source: R/conversion.R

get.incidenceR Documentation

Bipartite adjacency matrix of a bipartite graph

Description

[Deprecated]

get.incidence() was renamed to as_biadjacency_matrix() to create a more consistent API.

Usage

get.incidence(graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE)

Arguments

graph

The input graph. The direction of the edges is ignored in directed graphs.

types

An optional vertex type vector to use instead of the type vertex attribute. You must supply this argument if the graph has no type vertex attribute.

attr

Either NULL or a character string giving an edge attribute name. If NULL, then a traditional bipartite adjacency matrix is returned. If not NULL then the values of the given edge attribute are included in the bipartite adjacency matrix. If the graph has multiple edges, the edge attribute of an arbitrarily chosen edge (for the multiple edges) is included.

names

Logical scalar, if TRUE and the vertices in the graph are named (i.e. the graph has a vertex attribute called name), then vertex names will be added to the result as row and column names. Otherwise the ids of the vertices are used as row and column names.

sparse

Logical scalar, if it is TRUE then a sparse matrix is created, you will need the Matrix package for this.


igraph/rigraph documentation built on May 19, 2024, 6:19 a.m.