sortweb | R Documentation |
This function sorts bipartite webs by either increasing/decreasing row and column totals or by a given sequence
sortweb(web, sort.order="dec", sequence=NULL)
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: |
Returns an ordered bipartite web.
Bernd Gruber
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.
For plotting and ordered web see plotweb
, method="normal" or visweb
, type="none".
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.