Calculate the richness (number of non-0 entries) of a given sample.

richness(x)

Arguments

x

numeric vector

Value

numeric value of the number of non-0 entries in x.