Package 'selectapref'

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

Help Index


Forage Ratio (Strauss 1979).

Description

Returns forage ratio from vectors of consumed and available food items.

Usage

FR(available, consumed)

Arguments

available

A vector of food items available to the organism in the environment

consumed

A vector of food items consumed by the organism

Examples

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.

Description

Ivlev's electivity (Ivlev 1961). Returns Ivlev's electivity index from vectors of consumed and available food items.

Usage

ivlev(available, consumed, jacob = FALSE)

Arguments

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.

Examples

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'as alpha index from vectors of initial and final food item counts.

Description

Manly's alpha feeding preference (Chesson 1978). Returns Manly's alpha index from vectors of initial and final food item counts.

Usage

manlysalpha(initial, consumed, stand = FALSE, perc = FALSE,
  deplete = TRUE)

Arguments

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.

Examples

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)