Calculate indices of niche width and individual specialisation, following Bolnick et al. 2002 (doi:10.1890/0012-9658(2002)083[2936:MILRS]2.0.CO;2 ).
TNW
calculates the Total Niche Width of the population, using Shannon diversity.
WIC
calculates the Within-Individual Component of niche width
as a weighted average of individuals' Shannon diversity
(i.e. the Shannon diversity value of each individual plant is weighted by
the proportion of visits or interactions received by that plant).
WIC
can also return the individual Shannon diversity values, if indiv = TRUE
.
indiv_spec
returns a data.frame with the following columns:
WIC (Within-Individual Component)
TNW (Total Niche Width)
IndSpec (Individual Specialisation index, calculated as the ratio WIC / TNW).
Arguments
- net
A matrix or data.frame containing interaction data. Plants in rows, Animals in columns. Numbers need not be integers (i.e. counts), can be relative abundances or interaction frequencies.
- indiv
Logical. If TRUE, return individual Shannon diversity values. If FALSE, return the weighted average of individual Shannon diversity, weighted by the proportion of interactions represented by each plant (i.e. the WIC).