##### beta.meths.CI is deprecated. Please use conf.meth! #####
## Fatty Acids
data(FAset)
fa.set = as.vector(unlist(FAset))
## Predators
data(predatorFAs)
tombstone.info = predatorFAs[,1:4]
predator.matrix = predatorFAs[, fa.set]
npredators = nrow(predator.matrix)
## Prey
prey.sub = preyFAs[, fa.set]
prey.sub = prey.sub / apply(prey.sub, 1, sum)
group = as.vector(preyFAs$Species)
prey.matrix.full = cbind(group,prey.sub)
prey.matrix = MEANmeth(prey.matrix.full)
## Calibration Coefficients
data(CC)
cal.vec = CC[CC$FA %in% fa.set, 2]
cal.mat = replicate(npredators, cal.vec)
# Note: uncomment examples to run. CRAN tests fail because execution time > 5 seconds
# set.seed(1234)
# diet.est <- p.QFASA(predator.mat = predator.matrix,
# prey.mat = prey.matrix,
# cal.mat = cal.mat,
# dist.meas = 2,
# start.val = rep(1,nrow(prey.matrix)),
# ext.fa = fa.set)[['Diet Estimates']]
#
# ci = beta.meths.CI(predator.mat = predator.matrix,
# prey.mat = prey.matrix.full,
# cal.mat = cal.mat,
# dist.meas = 2,
# nprey = 10,
# R.p = 1,
# R.ps = 10, #
# R = 1,
# p.mat = diet.est,
# alpha = 0.05,
# ext.fa = fa.set)
Run the code above in your browser using DataLab