Calculates similarity-sensitive subcommunity gamma diversity (the contribution per individual toward metacommunity diversity). This measure may be calculated for a series of orders, represented as a vector of qs.

sub_gamma(meta, qs)

Arguments

meta

object of class metacommunity

qs

vector of mode numeric containing q values

Value

sub_gamma returns a standard output of class rdiv

References

R. Reeve, T. Leinster, C. Cobbold, J. Thompson, N. Brummitt, S. Mitchell, and L. Matthews. 2016. How to partition diversity. arXiv 1404.6520v3:1–9.

Examples

pop <- data.frame(a = c(1,3), b = c(1,1))
row.names(pop) <- paste0("sp", 1:2)
pop <- pop/sum(pop)
meta <- metacommunity(pop)

# Calculate subcommunity gamma diversity
sub_gamma(meta, 0:2)
#>   measure q type_level type_name partition_level partition_name diversity
#> 1   gamma 0      types              subcommunity              a  1.875000
#> 2   gamma 0      types              subcommunity              b  2.250000
#> 3   gamma 1      types              subcommunity              a  1.783811
#> 4   gamma 1      types              subcommunity              b  2.121320
#> 5   gamma 2      types              subcommunity              a  1.714286
#> 6   gamma 2      types              subcommunity              b  2.000000
#>   dat_id transformation normalised  k max_d
#> 1  naive             NA         NA NA    NA
#> 2  naive             NA         NA NA    NA
#> 3  naive             NA         NA NA    NA
#> 4  naive             NA         NA NA    NA
#> 5  naive             NA         NA NA    NA
#> 6  naive             NA         NA NA    NA