Learn R Programming

bipartiteD3 (version 0.3.2)

OrderByCrossover: Find Species Order That Minimises Crossover

Description

Find an order of species that is likely to minimise cross over. It builds upon the 'cca' method used in the bipartite package, but orders the compartments by size, which tends to give better effects.

Usage

OrderByCrossover(df)

Value

A list containing 'PrimaryOrder' and 'SecondaryOrder', to be used with bipartite_d3()

Arguments

df

A network in data.frame format. (row names for primary layer, column names for secondary layer)

Examples

Run this code

if (FALSE) {

data(Safariland, package='bipartite')


S_orders <- OrderByCrossover(Safariland)

bipartite_D3(Safariland,
  filename = 'SF_sorted',
  SortPrimary = S_orders[[1]],
  SortSecondary = S_orders[[2]])
}

Run the code above in your browser using DataLab