简体   繁体   English

在纯素包装中使用Specpool时出现错误消息

[英]Error message when using Specpool in Vegan Package

I'm trying to calculate species richness and chao for a list of sites. 我正在尝试为站点列表计算物种丰富度和混乱度。 However I keep getting this error message: 但是我不断收到此错误消息:

Error in if (a2 > 0) var.chao[is] <- a1 * ssc * (0.5 + ssc * (1 + aa/4) *  : missing value where TRUE/FALSE needed

I'm not completely sure what the error message is trying to imply. 我不确定错误消息试图暗示什么。 Specpool works with the same dataset when trying to find the values of an country (for example) just not when I use the sites category. 当尝试查找国家(例如)的值时,Specpool使用相同的数据集,而不是在我使用站点类别时。

I can put up dataset if needed. 如果需要,我可以建立数据集。

Anyone got any ideas? 任何人有任何想法吗?

You had some cases with one sampling unit per class. 您有一些案例,每个班级只有一个采样单位。 The specpool function is based on presence/absence data and numbers of species frequencies in a collection of sampling units. specpool功能基于存在/不存在的数据以及一组采样单位中物种频率的数量。 With only one site, you cannot have but frequency = 1, and some of the indices (Chao, 2nd order Jackknife) need the number of doubletons (= number of species occurring in two sampling units). 仅具有一个站点,您就不能只有频率= 1,并且某些指数(Chao,二阶折刀)需要doubleton数(=以两个采样单位出现的物种数)。 Although the extrapolated richness cannot be estimated from a single sampling unit in specpool , such cases should be handled smoothly. 尽管无法从specpool的单个采样单位估算推断出的丰富度,但应specpool处理此类情况。 The github version of vegan now handles those cases, and I have scheduled release of vegan 2.3-3 next week with this fix. 素食主义者的github版本现在可以处理这些情况,并且我已计划在下周通过此修复程序发布素食主义者 2.3-3。 The one-sampling-unit cases will now return the non-extrapolated observed number of species with standard error = 0 for all indices. 现在,以一个抽样单位为例,将返回所有指标的未外推观察物种数,标准误差= 0。

You seem to have classes with either one or two sampling units. 您似乎有一个带有一个或两个采样单位的类。 Although extrapolated species richness can be estimated for two sampling units, I would not trust such extrapolations: you need larger collections (and if you read carefully the specpool documentation and the articles referenced therein, you may see that we do not have much trust in these extrapolations in general). 尽管可以为两个采样单位估算外推物种的丰富度,但我不相信这样的推论:您需要更大的集合(并且,如果您仔细阅读specpool文档其中引用的文章,您可能会发现我们对这些不那么信任外推法)。

I found out what the issue was. 我发现了问题所在。 I had one site where I had only recorded one species which made the Chao calculation impossible. 我在一个站点上只记录了一个物种,因此无法进行Chao的计算。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM