ivlev {selectapref} | R Documentation |
Ivlev's electivity (Ivlev 1961). Returns Ivlev's electivity index from vectors of consumed and available food items.
ivlev(available, consumed, jacob = FALSE)
available |
A vector of food items available to the organism in the environment |
consumed |
A vector of food items consumed by the organism |
jacob |
Converts to Jacob's electivity index? Defaults to FALSE. |
availableprey <- c(10,10,10,10,10)
consumedprey <- c(9,0,0,1,5)
ivlev(available = availableprey, consumed = consumedprey, jacob = FALSE)
ivlev(available = availableprey, consumed = consumedprey, jacob = TRUE)