Description Usage Arguments Details Value Examples
View source: R/EndpointSummaryStats.R
Implements the function [FD::dbFD()] from the package FD, for use on Pheno-Evo data. It calculates functional richness (FRic), functional evenness (FEve), functional divergence (FDiv), and functional dispersion (FDis). Please read the [FD::dbFD()] documentation for a more thorough explanation and references.
1 | calc.fun.div(ends.df, trait)
|
ends.df |
Dataframe of endpoint data, generated by extract.endpoint(). Must contain individual-level data for the trait in question. |
trait |
Trait for which you want to calculate diversity. This must use same name as in column names of ends.df, and be enclosed in quotation marks. |
Note that not all diversity metrics are calculable for all datasets. You may get an error message warning you of metrics that can't be calculated for yours. Dataframes from timepoints other than the endpoint are also fine, as long as there is only 1 row per run number.
A new dataframe that provides the values of four diversity metrics for each run number.
1 2 3 | data(PhenoEvoData_small)
PE.ends_small<-extract.endpoint(PhenoEvoData_small, c(2, 4, 6))
calc.fun.div(PE.ends_small, trait='degrade.rate')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.