Skip to contents

Bipartite network approaches are often used for analyzing the structure of interactions among species in communities. Although typically ecosystem networks are handled using a unipartite representation, anlayzing them from a bipartite perspective may be informative. This function provides an easy means for converting to a bipartite representation as long as there is a natural division to categorize species into distinct modes.

Usage

as.bipartite(x = "network object", y = "membership vector")

Arguments

x

A network object.

y

A vector of membership values.

Value

Returns a matrix with the species of one mode arrayed in rows and the other in columns.

Author

Matthew K. Lau

Examples


data(oyster)
as.bipartite(oyster, gl(2, 3))
#>                Deposit Feeders Predators Deposited Detritus
#> Filter Feeders          0.0000    0.5135            15.7910
#> Microbiota              1.2060    0.0000             0.0000
#> Meiofauna               0.6609    0.0000             4.2403