Description Usage Arguments Details Value Examples
Get branch length information of MST for the community specified in
abund
in the trait space defined by spp_traits
.
1 2 3 4 5 6 | communityMST(
abund,
spp_traits,
abundWeighted = TRUE,
dis_metric = c("euclidean", "manhattan")
)
|
abund |
a numeric vector of species abundances in the community of
interest. Species order in this vector needs to be same as that in species
trait data (rows of |
spp_traits |
a matrix (or data frame) of numeric functional traits for species. Columns are for different traits and rows are for different species in the species pool. |
abundWeighted |
logical; indicating whether the abundance values in
|
dis_metric |
string specifying the scheme of quantifying species
dissimilarity in trait space. The currently available options are
|
...
If abundWeighted
is TRUE
, return sorted branch
lengths of abundance-weighted MST. If abundWeighted
is FALSE
,
return sorted branch lengths of raw MST.
1 2 3 4 5 6 7 | d_trait <- cbind(tr1 = rnorm(10, 0, 1), tr2 = rnorm(10, 3, 2))
comm1 = c(0:9)
comm2 = rep(1, 10)
communityMST(comm1, d_trait, abundWeighted = TRUE)
communityMST(comm1, d_trait)
communityMST(comm2, d_trait, abundWeighted = TRUE)
communityMST(comm2, d_trait)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.