Spade Q&A


When using your SpadeR statistical package for analysing my biodiversity data I keep getting two kinds of errors for some of my sites while the package calculates the biodiversity indices correctly for other sites. I’ve been using this function: Diversity(data=mydata, datatype = c(“abundance”), q = NULL)

These are data from three sites I have been using:
No error: mydata1<-c(332, 1, 2, 0, 0, 0, 1, 14, 126, 13, 72, 137, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0)
Error: mydata2<-c(373, 38, 156, 0, 0, 1, 1, 1, 39, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0) This returns: Error in if (gamma_rare_hat_square != 0) { : missing value where TRUE/FALSE needed


It was due to the problem that there is no singleton in the bootstrap resampling. We have solved this problem. Please download the latest version from our website.



With SpadeR, what can I do to have cut-off point k = 10, k = 50, … for the same sample?


Yes, you can try the following code to set k = 10, k = 50 or any integer you want for the same sample,

ChaoSpecies(data, datatype = c(“abundance”, “incidence”), k = 10, conf = 0.95)

ChaoSpecies(data, datatype = c(“abundance”, “incidence”), k = 50, conf = 0.95)



We would like to understand how the species table for incidence data should be organized?


The first entry of the input data must be the total number of sampling units, followed by species incidence frequencies in each column (See example data(ChaoSharedDataInci) in the software).


How do we use the model command to read the table? If there is a user guide we would appreciate if you could share it with us.


For example if you run the main function as follow, 

ChaoSpecies(data, datatype = c(“abundance”), k = 10,conf = 0.95)

You can use following commands:

$Basic.Data.Information, $Rare.Species.Group or $Species.Table

to get the table you want.

You can download Spade user guide, SpadeR-manual in our website.



I am interested in using SpadeR online for analysis, but there is no mention of the type of input file that the Spade accepts.
E.g. EstimateS accepts Text (Tab delimited), what about Spade R.


Your data must be a txt file, please see the details in SpadeR online user guide, which now can be downloaded from our website.


I’m currently using a couple of the packages you’ve placed on CRAN, working with species richness estimation using fossil data. I think there’s a small bug in the SpadeR::ChaoSpecies function which makes it not compute if there are no species observed twice or four times. If f2=0 and f4=0, it does not return any output, and it’s due to an attempt of dividing f2/f4 ////inside a conditional boolean check. Can be reproduced by
abs = c(1,1,3,3,5,6,7)


Your problem was due to that there are no doubleton in your data. We have modified our code to solve your problem. Please download the latest version from our website or Github.