Description Usage Arguments Value Examples
Note: if preysize=1, then one prey is selecting from each species. otherwise, a sample of size n_k (number of species k) is sampled with replacement.
1 | pseudo.pred(diet, preybase, cal.vec, fat.vec, preysize = 2)
|
diet |
compositional vector of proportions that sums to one. Length is equal to the number of prey species. |
preybase |
prey database with first column providing the species name. |
cal.vec |
vector of calibration coefficients. |
fat.vec |
vector of fat content whose length is the same as the number of species. |
preysize |
number of prey to sample from prey database. |
a simulated predator FA signature
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(preyFAs)
# Note: uncomment examples to run. CRAN tests fail because execution time > 5 seconds
# p.mat <- matrix(rep(NA,100*11),nrow=100)
# for (i in 1: 100) {
# my.seal <- pseudo.pred(rep(1/11,11),
# preyFAs[,-c(1,3)],
# rep(1,ncol(preyFAs[,-c(1,3)])-1),
# rep(1,11))
# p.mat[i,] <- p.QFASA(my.seal,
# MEANmeth(preyFAs[,-c(1,3)]),
# rep(1,length(my.seal)),
# 2,
# ext.fa=colnames(preyFAs[,-c(1:3)]))$`Diet Estimates`
# }
#
# Average diet estimate
# round(apply(p.mat,2,mean),3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.