Learn R Programming

spiders (version 1.2)

spiders-package: Fits predator preferences model.

Description

Models predator preferences over an array of time and prey species

Arguments

Details

Package:
spiders
Type:
Package
Version:
1.0
Date:
2014-04-30
License:
GPL

References

Reliability Estimates for Ivlev's Electivity Index, the Forage Ratio, and a Proposed Linear Index of Food Selection Richard E. Strauss Transactions of the American Fisheries Society Vol. 108, Iss. 4, 1979

Examples

Run this code
## make up some numbers
Predators <- 20
Traps <- 20                              
PreySpecies <- 3
Times <- 12
ST <- Times*PreySpecies
l <- matrix(1:ST, nrow=Times, ncol=PreySpecies)
g <- matrix(2*(1:ST), nrow=Times, ncol=PreySpecies)

##  simulate data
fdata <- simPref(PreySpecies, Times, Predators, Traps, l, g)

## calculate model
(prefs <- predPref(fdata$eaten, fdata$caught))

Run the code above in your browser using DataLab