compute_compet_distance.Rd
This function compute trait distance between species using a trait matrix and a trait weights data.frame. For all the traits with competition weights not equal to zero, it computes a weighted 'composite trait' that is then used to compute euclidean trait distance between species. Trait distance is first exponentiated then standardized between 0 and 1.
compute_compet_distance(trait_weights, traits, exponent = 1)
data.frame with at least three columns equal to trait
(giving the name of the concerned traits in traits
df), growth_weight
the relative weight of the trait in
growth and compet_weight
the relative weight of the
trait in competition.
a species-traits data.frame with species as rownames and
traits as numeric columns with names matching
trait_weights
column trait
[numeric(1)
] (default: 1)
The exponent used before standardizing the distance
an euclidean distance matrix (of type matrix)