Title: | Analysis of Field and Laboratory Foraging |
---|---|
Description: | Provides indices such as Manly's alpha, foraging ratio, and Ivlev's selectivity to allow for analysis of dietary selectivity and preference. Can accommodate multiple experimental designs such as constant prey number of prey depletion. Please contact the package maintainer with any publications making use of this package in an effort to maintain a repository of dietary selections studies. |
Authors: | Jason Richardson [aut, cre] |
Maintainer: | Jason Richardson <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.2 |
Built: | 2025-01-20 04:25:19 UTC |
Source: | https://github.com/cran/selectapref |
Returns forage ratio from vectors of consumed and available food items.
FR(available, consumed)
FR(available, consumed)
available |
A vector of food items available to the organism in the environment |
consumed |
A vector of food items consumed by the organism |
availableprey <- c(10,10,10,10,10) consumedprey <- c(9,0,0,1,5) FR(available = availableprey, consumed = consumedprey)
availableprey <- c(10,10,10,10,10) consumedprey <- c(9,0,0,1,5) FR(available = availableprey, consumed = consumedprey)
Ivlev's electivity (Ivlev 1961). Returns Ivlev's electivity index from vectors of consumed and available food items.
ivlev(available, consumed, jacob = FALSE)
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)
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)
Manly's alpha feeding preference (Chesson 1978). Returns Manly's alpha index from vectors of initial and final food item counts.
manlysalpha(initial, consumed, stand = FALSE, perc = FALSE, deplete = TRUE)
manlysalpha(initial, consumed, stand = FALSE, perc = FALSE, deplete = TRUE)
initial |
A vector of initial food items counts available to the organism in the environment |
consumed |
A vector of food items consumed by the organism |
stand |
Converts values with highest standardized to "1"? Defaults to FALSE. |
perc |
Converts values to percentages? Defaults to FALSE. |
deplete |
For use in experiments where food sources deplete? Defaults to TRUE. |
initial_prey_count <- c(10,10,10,10,10,10) number_prey_consumed <- c(9,8,1,3,5,9) manlysalpha(initial = initial_prey_count, consumed = number_prey_consumed, stand = TRUE, perc = FALSE, deplete = TRUE) manlysalpha(initial = initial_prey_count, consumed = number_prey_consumed, stand = TRUE, perc = TRUE, deplete = TRUE)
initial_prey_count <- c(10,10,10,10,10,10) number_prey_consumed <- c(9,8,1,3,5,9) manlysalpha(initial = initial_prey_count, consumed = number_prey_consumed, stand = TRUE, perc = FALSE, deplete = TRUE) manlysalpha(initial = initial_prey_count, consumed = number_prey_consumed, stand = TRUE, perc = TRUE, deplete = TRUE)