Closed equihuam closed 6 years ago
Hi - I am facing a similar situation: the warning message from iNEXT seems incorrect. I find that iNEXT is not happy with a list of species abundances that does not include at least one species with an abundance of 1. If there is one species with a 1 abundance, and one with a 0, it seems OK, oddly.
If we use the spider data built in....
library(iNEXT)
data(spider)
# spider data, focus on Girdled
data(spider)
# create 7 abundance vectors with various amounts of 1's and 0.
spiderG1 <- spider$Girdled # OK
spiderG2 <- spider$Girdled[spider$Girdled>1] # Incorrect Warning
spiderG3 <- c(spider$Girdled[spider$Girdled>1],1,1) # OK
spiderG4 <- c(spider$Girdled[spider$Girdled>1],1) # OK
spiderG5 <- c(spider$Girdled[spider$Girdled>1],1,0) # Oddly OK
spiderG6 <- c(spider$Girdled[spider$Girdled>1],0) # Incorrect Warning
spiderG7 <- c(spider$Girdled[spider$Girdled>1],0,0) # Incorrect Warning
iNEXT(spiderG1)
iNEXT(spiderG2)
iNEXT(spiderG3)
iNEXT(spiderG4)
iNEXT(spiderG5)
iNEXT(spiderG6)
iNEXT(spiderG7)
I understand that we should probably remove 0's (?), but perhaps this is also something that can happen in iNEXT? The raw data for species rich but low abundance/site situations will be a very ragged list when 0's are removed in advance (which is fine, if you want the user to manage this).
In my experience and in congruence with andbeck the error is only absent when there are both 2's and 1's in the vector. Only 1 or only 2 or neither messes things up. Much appreciated if this can be fixed!!
This issue had been fixed in iNEXT version 2.0.16 :)
Hello! I have been struggling with a similar issue now for a while, even though I am using iNext 2.0.20 (on RStudio 1.3.903, R 3.6.1, mac Sierra). I have a data set (data frame with rows being species and columns being sites) with some sites having very few species, and I can only make iNext run without error message if I filter these sites away. Specifically, my sites mostly have thousands of species , but there are a few that have only 0-10. If I let these be in the data, I get an error message:
df_inext <- prepare_inext(df, correct_singletons = F) inextobject<- iNEXT(df_inext)
"The Bootstrap community has only one species. Estimation is not robust.no non-missing arguments to max; returning -Inf"
If I try plotting the result with ggiNext, it gives another error:
ggiNEXT(inextobject, type = 1) + theme(legend.position="none")
Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match
If I filter these few low-sample-size samples out, then the errors disappear. However, I am not sure if the resulting completeness curves and asymptotic diversity estimates are reliable, if they are based on a data that has all low-diversity samples filtered out? I'm trying to use iNext to estimate at what sample size the completeness curve plateaus and how sample size per site affects diversity estimates and correct them accordingly.
I am running on Windows 8.1 (x64), Rstudio 1.0.143 and iNEXT 2.0.14
My data set is:
I used this code lines:
The result issued missleading warnings stating that only one species was found (when richness is correctly reported in the summary):
But all the estimates seemed to be OK:
If I change the first line of the data.frame replacing "zeroes" with "ones", like so:
data [1, 2:4] <- 1
No warnings are produced.