I'm working on the fbg_filter_trait_coverage() function which allows user to filter its site-species matrix according to a trait coverage threshold. Let's say for example "retain all the sites with a trait coverage >= 75%" meaning that all the sites for which abundance/summed presence of species in the trait data represent at least 75% of the total are retained.
However if no such sites are found, what should we return? Should it be NULL? A matrix(nrow = 0, ncol = 0) object? An error?
For the moment it'll be NULL but it would be good to give a thought and justify this choice.
I'm working on the
fbg_filter_trait_coverage()
function which allows user to filter its site-species matrix according to a trait coverage threshold. Let's say for example "retain all the sites with a trait coverage >= 75%" meaning that all the sites for which abundance/summed presence of species in the trait data represent at least 75% of the total are retained.However if no such sites are found, what should we return? Should it be
NULL
? Amatrix(nrow = 0, ncol = 0)
object? An error? For the moment it'll beNULL
but it would be good to give a thought and justify this choice.