Returns one component of beta_pair(), or one dissimilarity of
beta_hill_pair(), as a stats::dist object, ready for ordination and
testing with vegan, for example vegan::metaMDS(), vegan::adonis2()
or vegan::betadisper(), or for clustering with stats::hclust().
Arguments
- x
A
td_beta_pairtibble frombeta_pair()or atd_beta_hill_pairtibble frombeta_hill_pair(), without groups.- component
For
beta_pair()output:"total","turnover"or"nestedness"(default"total"). Forbeta_hill_pair()output: one of itsdis_columns (default"dis_sorensen").- q
For
beta_hill_pair()output with several orders, the order to use.
Examples
d <- beta_dist(beta_pair(png_ants[png_ants$season == "wet", ]))
hclust(d)
#>
#> Call:
#> hclust(d = d)
#>
#> Cluster method : complete
#> Number of objects: 5
#>
wet <- png_ants[png_ants$season == "wet", ]
beta_dist(beta_hill_pair(wet, abundance = workers), q = 2)
#> MW0200 MW0700 MW1200 MW1700
#> MW0700 0.8931865
#> MW1200 0.8934988 0.5378074
#> MW1700 0.9999783 0.9999473 0.9493274
#> MW2200 1.0000000 1.0000000 1.0000000 0.9811531