nestedrank function

Calculates the rank of a species in a matrix sorted for maximum nestedness