sortweb {bipartite} | R Documentation |
Function to sort bipartite webs
Description
This function sorts bipartite webs by either increasing/decreasing row and column totals or by a given sequence
Usage
sortweb(web, sort.order="dec", sequence=NULL)
Arguments
web |
A matrix representing the interactions observed between higher trophic level species (columns) and lower trophic level species (rows). Usually this will be number of pollinators on each species of plants or number of parasitoids on each species of prey. |
sort.order |
sort.order can be either |
sequence |
list of two with two named vectors: |
Value
Returns an ordered bipartite web.
Author(s)
Bernd Gruber
References
Vázquez, P.D., Chacoff, N.,P. and Cagnolo, L. (2009) Evaluating multiple determinants of the structure of plant-animal mutualistic networks. Ecology in press.
See Also
For plotting and ordered web see plotweb
, method="normal" or visweb
, type="none".
Examples
data(Safariland)
web <- Safariland
sortweb(Safariland, sort.order="dec")
#rarest species first:
plotweb(sortweb(Safariland, sort.order="inc"), method="normal")
visweb(sortweb(Safariland,sort.order="inc"), type="diagonal",
square="compartment", text="none", frame=TRUE)
# sorted by a given (here random) sequence
sequence <- list(seq.higher=sample(colnames(Safariland)),
seq.lower=sample(rownames(Safariland)))
web.ordered <- sortweb(web, sort.order="seq", sequence=sequence)