Performance comparison with other functional diversity packages

This vignette presents some performance tests ran between fundiversity and other functional diversity packages. Note that to avoid the dependency on other packages, this vignette is pre-computed.

Other packages to compute FD indices

Main functions

FD::dbFD() is probably the most known function to compute functional diversity indices. It comes from the FD package proposed by Laliberté, Legendre, and Shipley (2014). It can compute many indices: functional richness, Rao’s quadratic entropy, community-weighted mean, functional divergence, functional dispersion, and functional group richness. This swiss-army knife of functional diversity indices has many options and compute several indices in a single run.

hillR::hill_func() comes from the hillR package that computes Hill numbers for taxonomic, functional, and functional diversity (Li 2018). It implements indices proposed by Chao, Chiu, and Jost (2014). It computes Rao’s quadratic entropy, the mean functional diversity per species, as well as the total functional diversity.

adiv::QE() comes from the adiv package which proposes a toolkit to analyze biodiversity (Pavoine 2020). This function computes Rao’s quadratic entropy.

SYNCSA::rao.diversity() comes from SYNCSA package which proposes a simulation framework for meta-communities (Debastiani and Pillar 2012). The function computes Rao’s quadratic entropy as well as functional redundancy.

mFD::alpha.fd.hill() comes from the mFD package which offers a coherent framework to work with functional spaces and perform quality checks, diagnostic plots, as well as computing many functional diversity indices.

Benchmark between packages

We will now benchmark the functions included in fundiversity with the corresponding function in other packages using the microbenchmark::microbenchmark() function.

tictoc::tic()
library(fundiversity)
data("traits_birds", package = "fundiversity")
data("site_sp_birds", package = "fundiversity")

dist_traits_birds <- dist(traits_birds)

With the fairly small (~220 species, 8 sites, 4 traits) provided dataset in fundiversity:

pkg_bench <- microbenchmark::microbenchmark(
  fundiversity = {
    fundiversity::fd_raoq(traits = NULL, site_sp_birds, dist_traits_birds)
  },
  adiv = {
    adiv::QE(site_sp_birds, dis = dist_traits_birds)
  },
  hillR = {
    hillR::hill_func(site_sp_birds, dist_traits_birds, traits_as_is = TRUE)[1, ]
  },
  SYNCSA = {
    SYNCSA::rao.diversity(site_sp_birds,
                          phylodist = as.matrix(dist_traits_birds),
                          standardize = FALSE)$PhyRao
  },
  FD = {
    suppressMessages(
      FD::dbFD(x = dist_traits_birds, a = site_sp_birds, stand.x = FALSE,
               calc.FRic = TRUE, calc.CWM = FALSE, calc.FDiv = FALSE,
               calc.FGR = FALSE, m = "max", stand.FRic = FALSE,
               messages = FALSE))
  },
  mFD = {
    mFD::alpha.fd.hill(site_sp_birds, dist_traits_birds, q = 2, tau = "max",
                       details_returned = FALSE)
  },
  times = 500
)

ggplot2::autoplot(pkg_bench)

Performance comparison in computing Rao’s quadratic entropy between fundiversity and other packages

pkg_bench
#> Unit: milliseconds
#>          expr         min          lq        mean      median          uq       max neval  cld
#>  fundiversity    2.287913    2.630710    3.089326    2.762887    2.891716   44.3695   500 a   
#>          adiv   14.906173   15.719250   26.646127   16.773885   32.032801  103.7893   500  b  
#>         hillR   20.696094   22.602998   32.499789   24.343631   33.482000  680.6541   500  b  
#>        SYNCSA  101.301958  105.161422  129.325061  118.840921  146.598844  758.1414   500   c 
#>            FD 3849.335158 3956.290358 4053.866622 4000.860019 4050.856521 4778.5860   500    d
#>           mFD    4.251853    4.609947   11.588040    4.842196    5.545768  665.1295   500 a

Benchmark within fundiversity

We now proceed to the performance evaluation of functions within fundiversity with datasets of increasing sizes.

Increasing the number of species

make_more_sp <- function(n) {
  traits <- do.call(rbind, replicate(n, traits_birds, simplify = FALSE))
  row.names(traits) <- paste0("sp", seq_len(nrow(traits)))

  site_sp <- do.call(cbind, replicate(n, site_sp_birds, simplify = FALSE))
  colnames(site_sp) <- paste0("sp", seq_len(ncol(site_sp)))

  list(tr = traits, si = site_sp)
}

null_sp_1000   <- make_more_sp(5)
null_sp_10000  <- make_more_sp(50)
null_sp_100000 <- make_more_sp(500)

Functional Richness

bench_sp_fric <- microbenchmark::microbenchmark(
  species_200    = fd_fric(     traits_birds, site_sp_birds),
  species_1000   = fd_fric(  null_sp_1000$tr, null_sp_1000$si),
  species_10000  = fd_fric( null_sp_10000$tr, null_sp_10000$si),
  species_100000 = fd_fric(null_sp_100000$tr, null_sp_100000$si),
  times = 30
)

ggplot2::autoplot(bench_sp_fric)

Performance comparison of fd_fric() with increasing number of species.

bench_sp_fric
#> Unit: milliseconds
#>            expr       min        lq      mean    median        uq        max neval cld
#>     species_200  17.43907  17.86243  19.25563  18.36463  19.43581   30.67592    30  a 
#>    species_1000  18.61623  18.95761  23.12715  19.33508  20.27961  116.57998    30  a 
#>   species_10000  28.16377  28.72545  58.63922  29.44426  37.00387  662.93365    30  a 
#>  species_100000 148.85628 172.34064 313.60939 180.87062 212.01963 2071.42395    30   b

Functional Divergence

bench_sp_fdiv <- microbenchmark::microbenchmark(
  species_200    = fd_fdiv(     traits_birds, site_sp_birds),
  species_1000   = fd_fdiv(  null_sp_1000$tr, null_sp_1000$si),
  species_10000  = fd_fdiv( null_sp_10000$tr, null_sp_10000$si),
  species_100000 = fd_fdiv(null_sp_100000$tr, null_sp_100000$si),
  times = 30
)

ggplot2::autoplot(bench_sp_fdiv)

Performance comparison of fd_fdiv() with increasing number of species.

bench_sp_fdiv
#> Unit: milliseconds
#>            expr       min        lq      mean    median        uq       max neval cld
#>     species_200  48.44905  49.03244  51.10591  49.83909  50.63842  80.15223    30  a 
#>    species_1000  49.90169  50.47038  54.57637  51.34235  54.04361  81.71650    30  a 
#>   species_10000  64.80198  65.77591 106.63771  66.45525  96.01833 822.19062    30  a 
#>  species_100000 284.15498 316.50850 448.10526 328.81308 358.02843 956.35379    30   b

Rao’s Quadratic Entropy

bench_sp_raoq <- microbenchmark::microbenchmark(
  species_200    = fd_raoq(     traits_birds, site_sp_birds),
  species_1000   = fd_raoq(  null_sp_1000$tr, null_sp_1000$si),
  species_10000  = fd_raoq( null_sp_10000$tr, null_sp_10000$si),
  times = 30
)

ggplot2::autoplot(bench_sp_raoq)

Performance comparison of fd_raoq() with increasing number of species.

bench_sp_raoq
#> Unit: milliseconds
#>           expr          min           lq         mean       median           uq         max neval cld
#>    species_200     2.670416     2.943108     5.652929     3.171312     3.366178    77.94491    30  a 
#>   species_1000    91.829330    92.648495   104.365654    94.808870   116.528429   126.52938    30  a 
#>  species_10000 24088.575237 24965.084344 25589.177876 25347.518500 26110.519379 28657.24666    30   b

Functional Evenness

bench_sp_feve <- microbenchmark::microbenchmark(
  species_200    = fd_feve(     traits_birds, site_sp_birds),
  species_1000   = fd_feve(  null_sp_1000$tr, null_sp_1000$si),
  species_10000  = fd_feve( null_sp_10000$tr, null_sp_10000$si),
  times = 30
)
#> Error in getGlobalsAndPackages(expr, envir = envir, globals = globals): The total size of the 2 globals that need to be exported for the future expression ('FUN(X = structure(c(0, 0, 0.000165289256198347, 0.000224719101123596,; 0, 0, 0, 0, 0.00016, 0.000158730158730159, 0.000165289256198347,; 0, 0, 0, 0, 0, 0, 0, 0.000165289256198347, 0.000224719101123596,; 0.000307692307692308, 0.000377358490566038, 0.00048780487804878,; 0, 0.00016, 0.000158730158730159, 0, 0, 0, 0, 0, 0, 0, 0, 0.000165289256198347,; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.000307692307692308, 0.000377358490566038,; ...; "sp10835", "sp10836", "sp10837", "sp10838", "sp10839", "sp10840",; "sp10841", "sp10842", "sp10843", "sp10844", "sp10845", "sp10846",; "sp10847", "sp10848", "sp10849", "sp10850"))))') is 899.49 MiB. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'dist_matrix' (899.48 MiB of class 'numeric') and 'FUN' (10.75 KiB of class 'function').

ggplot2::autoplot(bench_sp_feve)

Performance comparison of fd_feve() with increasing number of species.

bench_sp_feve
#> Unit: milliseconds
#>           expr         min          lq        mean      median          uq         max neval cld
#>    species_200    11.17215    11.44301    12.33728    11.79237    12.24989    20.59761    30  a 
#>   species_1000   197.85067   279.95442   280.47473   289.50154   297.68343   336.33779    30  a 
#>  species_10000 58136.53352 60618.48446 60999.92341 61352.07935 61751.75521 62372.93708    30   b

Comparing between indices

all_bench_sp <- list(fric = bench_sp_fric,
                     fdiv = bench_sp_fdiv,
                     raoq = bench_sp_raoq,
                     feve = bench_sp_feve) %>%
  bind_rows(.id = "fd_index") %>%
  mutate(n_sp = gsub("species_", "", expr) %>%
           as.numeric())

all_bench_sp %>%
  ggplot(aes(n_sp, time * 1e-9, color = fd_index)) +
  geom_point(alpha = 1/3) +
  geom_smooth() +
  scale_x_log10() +
  scale_y_log10() +
  scale_color_brewer(type = "qual",
                     labels = c(fric = "FRic", fdiv = "FDiv", raoq = "Rao's Q",
                                feve = "FEve")) +
  labs(title = "Performance comparison between indices",
       x = "# of species", y = "Time (in seconds)",
       color = "FD index") +
  theme_bw() +
  theme(aspect.ratio = 1)

Performance comparison between functions for distinct indices in fundiversity with increasing number of species. Smoothed trend lines and standard error envelopes ares shown.

Increasing the number of sites

make_more_sites <- function(n) {
  site_sp <- do.call(rbind, replicate(n, site_sp_birds, simplify = FALSE))
  rownames(site_sp) <- paste0("s", seq_len(nrow(site_sp)))

  site_sp
}

site_sp_100   <- make_more_sites(12)
site_sp_1000  <- make_more_sites(120)
site_sp_10000 <- make_more_sites(1200)

Functional Richness

bench_sites_fric = microbenchmark::microbenchmark(
  sites_10    = fd_fric(traits_birds, site_sp_birds),
  sites_100   = fd_fric(traits_birds, site_sp_100),
  sites_1000  = fd_fric(traits_birds, site_sp_1000),
  sites_10000 = fd_fric(traits_birds, site_sp_10000),
  times = 30
)

ggplot2::autoplot(bench_sites_fric)

Performance comparison of fd_fric() with increasing number of sites.

bench_sites_fric
#> Unit: milliseconds
#>         expr        min         lq       mean     median         uq        max neval cld
#>     sites_10   17.77558   18.58610   21.18691   19.36247   19.83560   66.98525    30 a  
#>    sites_100   32.91720   34.17783   37.24440   35.02940   35.70176   96.30081    30 a  
#>   sites_1000  178.65317  181.95299  221.38235  186.83763  191.94836 1102.60246    30  b 
#>  sites_10000 1754.78248 1785.23758 1857.44765 1846.69689 1890.84202 2232.53853    30   c

Functional Divergence

bench_sites_fdiv = microbenchmark::microbenchmark(
  sites_10    = fd_fdiv(traits_birds, site_sp_birds),
  sites_100   = fd_fdiv(traits_birds, site_sp_100),
  sites_1000  = fd_fdiv(traits_birds, site_sp_1000),
  sites_10000 = fd_fdiv(traits_birds, site_sp_10000),
  times = 30
)

ggplot2::autoplot(bench_sites_fdiv)

Performance comparison of fd_fdiv() with increasing number of sites.

bench_sites_fdiv
#> Unit: milliseconds
#>         expr        min         lq       mean     median         uq       max neval  cld
#>     sites_10   50.17003   51.88956   58.73887   53.34411   55.25329  197.9635    30 a   
#>    sites_100   80.40664   84.18102   97.06916   84.94270   94.98646  166.4284    30  b  
#>   sites_1000  386.55725  402.17618  429.92229  413.10485  469.88815  509.0017    30   c 
#>  sites_10000 3603.94346 3757.78241 3813.13545 3800.30931 3866.23993 4042.1464    30    d

Rao’s Quadratic Entropy

bench_sites_raoq = microbenchmark::microbenchmark(
  sites_10    = fd_raoq(traits = NULL, site_sp_birds, dist_traits_birds),
  sites_100   = fd_raoq(traits = NULL, site_sp_100,   dist_traits_birds),
  sites_1000  = fd_raoq(traits = NULL, site_sp_1000,  dist_traits_birds),
  sites_10000 = fd_raoq(traits = NULL, site_sp_10000, dist_traits_birds),
  times = 30
)

ggplot2::autoplot(bench_sites_raoq)

Performance comparison of fd_raoq() with increasing number of sites.

bench_sites_raoq
#> Unit: milliseconds
#>         expr       min          lq        mean      median          uq         max neval cld
#>     sites_10   2.43763    2.618498    2.835577    2.786454    2.899721    4.214509    30  a 
#>    sites_100   3.07880    3.293774    7.170445    4.036631   11.673449   22.447060    30  a 
#>   sites_1000  10.89814   11.346314   23.568799   12.680631   24.267842  161.626134    30  a 
#>  sites_10000 408.95982 1106.958572 1084.559002 1157.547212 1230.670102 1490.536708    30   b

Functional Evenness

bench_sites_feve = microbenchmark::microbenchmark(
  sites_10    = fd_feve(traits = NULL, site_sp_birds, dist_traits_birds),
  sites_100   = fd_feve(traits = NULL, site_sp_100,   dist_traits_birds),
  sites_1000  = fd_feve(traits = NULL, site_sp_1000,  dist_traits_birds),
  sites_10000 = fd_feve(traits = NULL, site_sp_10000, dist_traits_birds),
  times = 30
)

ggplot2::autoplot(bench_sites_feve)

Performance comparison of fd_feve() with increasing number of sites

bench_sites_feve
#> Unit: milliseconds
#>         expr         min          lq       mean      median         uq        max neval cld
#>     sites_10    27.47611    27.95555    34.4079    28.74399    29.6761   189.6112    30 a  
#>    sites_100   127.61540   130.15233   168.1676   132.48679   168.9531   819.7361    30 a  
#>   sites_1000  1195.25759  1268.52395  1432.1127  1287.19147  1839.7692  1916.8058    30  b 
#>  sites_10000 12192.27871 13661.60213 14675.2386 14058.28719 14820.7077 28405.1799    30   c

Comparing between indices

all_bench_sites <- list(fric = bench_sites_fric,
                        fdiv = bench_sites_fdiv,
                        raoq = bench_sites_raoq,
                        feve = bench_sites_feve) %>%
  bind_rows(.id = "fd_index") %>%
  mutate(n_sites = gsub("sites", "", expr) %>%
           as.numeric())

all_bench_sites %>%
  ggplot(aes(n_sites, time * 1e-9, color = fd_index)) +
  geom_point(alpha = 1/3) +
  geom_smooth() +
  scale_x_log10() +
  scale_y_log10() +
  scale_color_brewer(type = "qual",
                     labels = c(fric = "FRic", fdiv = "FDiv", raoq = "Rao's Q",
                                feve = "FEve")) +
  labs(title = "Performance comparison between indices",
       x = "# of sites", y = "Time (in seconds)",
       color = "FD index") +
  theme_bw() +
  theme(aspect.ratio = 1)

Performance comparison between functions for distinct indices in fundiversity with increasing number of sites. Smoothed trend lines and standard error envelopes ares shown.

Session info of the machine on which the benchmark was ran and time it took to run
#>  seconds needed to generate this document: 3694.109 sec elapsed
#> ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.3 (2020-02-29)
#>  os       Ubuntu 16.04.7 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       RStudio                     
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Europe/Berlin               
#>  date     2021-07-30                  
#> 
#> ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  !  package           * version    date       lib source                            
#>     abind               1.4-5      2016-07-21 [3] CRAN (R 3.5.0)                    
#>     ade4                1.7-17     2021-06-17 [1] CRAN (R 3.6.3)                    
#>     adegenet            2.1.3      2020-05-10 [1] CRAN (R 3.6.3)                    
#>     adegraphics         1.0-15     2018-12-18 [1] CRAN (R 3.6.3)                    
#>     adephylo            1.1-11     2017-12-18 [3] CRAN (R 3.5.0)                    
#>     adiv                2.0.1      2020-08-26 [1] CRAN (R 3.6.3)                    
#>     ape                 5.5        2021-04-25 [3] CRAN (R 3.6.3)                    
#>     assertthat          0.2.1      2019-03-21 [3] CRAN (R 3.5.3)                    
#>     boot                1.3-28     2021-05-03 [4] CRAN (R 3.6.3)                    
#>     cachem              1.0.5      2021-05-15 [3] CRAN (R 3.6.3)                    
#>     class               7.3-19     2021-05-03 [4] CRAN (R 3.6.3)                    
#>     classInt            0.4-3      2020-04-07 [3] CRAN (R 3.6.3)                    
#>     cli                 3.0.1      2021-07-17 [1] CRAN (R 3.6.3)                    
#>     cluster             2.1.2      2021-04-17 [4] CRAN (R 3.6.3)                    
#>     clusterGeneration   1.3.7      2020-12-15 [3] CRAN (R 3.6.3)                    
#>     coda                0.19-4     2020-09-30 [3] CRAN (R 3.6.3)                    
#>     codetools           0.2-18     2020-11-04 [4] CRAN (R 3.6.3)                    
#>     colorspace          2.0-2      2021-06-24 [1] CRAN (R 3.6.3)                    
#>     combinat            0.0-8      2010-08-05 [3] CRAN (R 3.5.0)                    
#>     crayon              1.4.1      2021-02-08 [3] CRAN (R 3.6.3)                    
#>     crosstalk           1.1.1      2021-01-12 [3] CRAN (R 3.6.3)                    
#>     DBI                 1.1.1      2021-01-15 [3] CRAN (R 3.6.3)                    
#>     deldir              0.2-10     2021-02-16 [3] CRAN (R 3.6.3)                    
#>     desc                1.3.0      2021-03-05 [3] CRAN (R 3.6.3)                    
#>     digest              0.6.27     2020-10-24 [3] CRAN (R 3.6.3)                    
#>     dplyr             * 1.0.7      2021-06-18 [1] CRAN (R 3.6.3)                    
#>     DT                  0.18       2021-04-14 [3] CRAN (R 3.6.3)                    
#>     e1071               1.7-7      2021-05-23 [3] CRAN (R 3.6.3)                    
#>     ellipsis            0.3.2      2021-04-29 [3] CRAN (R 3.6.3)                    
#>     evaluate            0.14       2019-05-28 [3] CRAN (R 3.6.0)                    
#>     expm                0.999-6    2021-01-13 [3] CRAN (R 3.6.3)                    
#>     FactoMineR          2.4        2020-12-11 [3] CRAN (R 3.6.3)                    
#>     fansi               0.5.0      2021-05-25 [3] CRAN (R 3.6.3)                    
#>     farver              2.1.0      2021-02-28 [3] CRAN (R 3.6.3)                    
#>     fastmap             1.1.0      2021-01-25 [3] CRAN (R 3.6.3)                    
#>     fastmatch           1.1-3      2021-07-23 [1] CRAN (R 3.6.3)                    
#>     FD                  1.0-12     2014-08-19 [1] CRAN (R 3.6.3)                    
#>     flashClust          1.01-2     2012-08-21 [3] CRAN (R 3.5.0)                    
#>  VP fundiversity      * 0.2.0      2021-01-22 [?] local                             
#>     future              1.21.0     2020-12-10 [3] CRAN (R 3.6.3)                    
#>     future.apply        1.7.0      2021-01-04 [3] CRAN (R 3.6.3)                    
#>     gdata               2.18.0     2017-06-06 [3] CRAN (R 3.5.0)                    
#>     generics            0.1.0      2020-10-31 [3] CRAN (R 3.6.3)                    
#>     geometry            0.4.5      2019-12-04 [3] CRAN (R 3.6.1)                    
#>     ggplot2           * 3.3.5      2021-06-25 [1] CRAN (R 3.6.3)                    
#>     ggrepel             0.9.1      2021-01-15 [3] CRAN (R 3.6.3)                    
#>     globals             0.14.0     2020-11-22 [3] CRAN (R 3.6.3)                    
#>     glue                1.4.2      2020-08-27 [3] CRAN (R 3.6.3)                    
#>     gmodels             2.18.1     2018-06-25 [3] CRAN (R 3.5.0)                    
#>     gtable              0.3.0      2019-03-25 [3] CRAN (R 3.5.3)                    
#>     gtools              3.9.2      2021-06-06 [3] CRAN (R 3.6.3)                    
#>     highr               0.9        2021-04-16 [3] CRAN (R 3.6.3)                    
#>     hillR               0.5.0      2020-07-07 [1] CRAN (R 3.6.3)                    
#>     hms                 1.1.0      2021-05-17 [3] CRAN (R 3.6.3)                    
#>     htmltools           0.5.1.1    2021-01-22 [3] CRAN (R 3.6.3)                    
#>     htmlwidgets         1.5.3      2020-12-10 [3] CRAN (R 3.6.3)                    
#>     httpuv              1.6.1      2021-05-07 [3] CRAN (R 3.6.3)                    
#>     httr                1.4.2      2020-07-20 [3] CRAN (R 3.6.3)                    
#>     igraph              1.2.6      2020-10-06 [3] CRAN (R 3.6.3)                    
#>     jpeg                0.1-9      2021-07-24 [1] CRAN (R 3.6.3)                    
#>     jsonlite            1.7.2      2020-12-09 [3] CRAN (R 3.6.3)                    
#>     KernSmooth          2.23-20    2021-05-03 [4] CRAN (R 3.6.3)                    
#>     knitr               1.33       2021-04-24 [3] CRAN (R 3.6.3)                    
#>     later               1.2.0      2021-04-23 [3] CRAN (R 3.6.3)                    
#>     lattice             0.20-44    2021-05-02 [4] CRAN (R 3.6.3)                    
#>     latticeExtra        0.6-29     2019-12-19 [3] CRAN (R 3.6.2)                    
#>     lazyeval            0.2.2      2019-03-15 [3] CRAN (R 3.5.3)                    
#>     leaps               3.1        2020-01-16 [3] CRAN (R 3.6.2)                    
#>     LearnBayes          2.15.1     2018-03-18 [3] CRAN (R 3.5.0)                    
#>     lifecycle           1.0.0      2021-02-15 [3] CRAN (R 3.6.3)                    
#>     listenv             0.8.0      2019-12-05 [3] CRAN (R 3.6.1)                    
#>     magic               1.5-9      2018-09-17 [3] CRAN (R 3.5.1)                    
#>     magrittr            2.0.1      2020-11-17 [3] CRAN (R 3.6.3)                    
#>     manipulateWidget    0.11.0     2021-05-31 [3] CRAN (R 3.6.3)                    
#>     maps                3.3.0      2018-04-03 [3] CRAN (R 3.5.0)                    
#>     MASS                7.3-54     2021-05-03 [4] CRAN (R 3.6.3)                    
#>     Matrix              1.3-4      2021-06-01 [4] CRAN (R 3.6.3)                    
#>     memoise             2.0.0      2021-01-26 [3] CRAN (R 3.6.3)                    
#>     mFD                 1.0.0      2021-07-29 [1] Github (CmlMagneville/mFD@a6af567)
#>     mgcv                1.8-36     2021-06-01 [4] CRAN (R 3.6.3)                    
#>     microbenchmark      1.4-7      2019-09-24 [1] CRAN (R 3.6.3)                    
#>     mime                0.11       2021-06-23 [1] CRAN (R 3.6.3)                    
#>     miniUI              0.1.1.1    2018-05-18 [3] CRAN (R 3.5.0)                    
#>     mnormt              2.0.2      2020-09-01 [3] CRAN (R 3.6.3)                    
#>     multcomp            1.4-17     2021-04-29 [3] CRAN (R 3.6.3)                    
#>     munsell             0.5.0      2018-06-12 [3] CRAN (R 3.5.0)                    
#>     mvtnorm             1.1-2      2021-06-07 [3] CRAN (R 3.6.3)                    
#>     nlme                3.1-152    2021-02-04 [4] CRAN (R 3.6.3)                    
#>     numDeriv            2016.8-1.1 2019-06-06 [3] CRAN (R 3.6.0)                    
#>     parallelly          1.26.0     2021-06-09 [3] CRAN (R 3.6.3)                    
#>     patchwork           1.1.1      2020-12-17 [1] CRAN (R 3.6.3)                    
#>     permute             0.9-5      2019-03-12 [3] CRAN (R 3.5.3)                    
#>     phangorn            2.7.0      2021-05-03 [3] CRAN (R 3.6.3)                    
#>     phylobase           0.8.10     2020-03-01 [3] CRAN (R 3.6.3)                    
#>     phytools            0.7-80     2021-06-03 [3] CRAN (R 3.6.3)                    
#>     pillar              1.6.2      2021-07-29 [1] CRAN (R 3.6.3)                    
#>     pkgconfig           2.0.3      2019-09-22 [1] CRAN (R 3.6.3)                    
#>     pkgload             1.2.1      2021-04-06 [3] CRAN (R 3.6.3)                    
#>     plotrix             3.8-1      2021-01-21 [1] CRAN (R 3.6.3)                    
#>     plyr                1.8.6      2020-03-03 [3] CRAN (R 3.6.3)                    
#>     png                 0.1-7      2013-12-03 [3] CRAN (R 3.5.0)                    
#>     prettyunits         1.1.1      2020-01-24 [3] CRAN (R 3.6.2)                    
#>     progress            1.2.2      2019-05-16 [3] CRAN (R 3.6.0)                    
#>     promises            1.2.0.1    2021-02-11 [3] CRAN (R 3.6.3)                    
#>     proxy               0.4-26     2021-06-07 [3] CRAN (R 3.6.3)                    
#>     purrr               0.3.4      2020-04-17 [3] CRAN (R 3.6.3)                    
#>     quadprog            1.5-8      2019-11-20 [3] CRAN (R 3.6.1)                    
#>     R6                  2.5.0      2020-10-28 [3] CRAN (R 3.6.3)                    
#>     raster              3.4-10     2021-05-03 [3] CRAN (R 3.6.3)                    
#>     RColorBrewer        1.1-2      2014-12-07 [3] CRAN (R 3.5.0)                    
#>     Rcpp                1.0.7      2021-07-07 [1] CRAN (R 3.6.3)                    
#>     RcppArmadillo       0.10.6.0.0 2021-07-16 [1] CRAN (R 3.6.3)                    
#>     reshape2            1.4.4      2020-04-09 [3] CRAN (R 3.6.3)                    
#>     rgl                 0.104.16   2021-01-10 [1] CRAN (R 3.6.3)                    
#>     rlang               0.4.11     2021-04-30 [3] CRAN (R 3.6.3)                    
#>     rmarkdown           2.8        2021-05-07 [3] CRAN (R 3.6.3)                    
#>     rncl                0.8.4      2020-02-10 [3] CRAN (R 3.6.2)                    
#>     RNeXML              2.4.5      2020-06-18 [3] CRAN (R 3.6.3)                    
#>     rprojroot           2.0.2      2020-11-15 [3] CRAN (R 3.6.3)                    
#>     rstudioapi          0.13       2020-11-12 [3] CRAN (R 3.6.3)                    
#>     sandwich            3.0-1      2021-05-18 [3] CRAN (R 3.6.3)                    
#>     scales              1.1.1      2020-05-11 [3] CRAN (R 3.6.3)                    
#>     scatterplot3d       0.3-41     2018-03-14 [3] CRAN (R 3.5.0)                    
#>     seqinr              4.2-8      2021-06-09 [3] CRAN (R 3.6.3)                    
#>     sessioninfo         1.1.1      2018-11-05 [3] CRAN (R 3.5.1)                    
#>     sf                  1.0-0      2021-06-09 [3] CRAN (R 3.6.3)                    
#>     shiny               1.6.0      2021-01-25 [3] CRAN (R 3.6.3)                    
#>     sp                  1.4-5      2021-01-10 [3] CRAN (R 3.6.3)                    
#>     spData              0.3.8      2020-07-03 [3] CRAN (R 3.6.3)                    
#>     spdep               1.1-8      2021-05-23 [3] CRAN (R 3.6.3)                    
#>     stringi             1.7.3      2021-07-16 [1] CRAN (R 3.6.3)                    
#>     stringr             1.4.0      2019-02-10 [3] CRAN (R 3.5.2)                    
#>     survival            3.2-11     2021-04-26 [4] CRAN (R 3.6.3)                    
#>     SYNCSA              1.3.4      2020-01-09 [1] CRAN (R 3.6.3)                    
#>     testthat          * 3.0.2      2021-02-14 [3] CRAN (R 3.6.3)                    
#>     TH.data             1.0-10     2019-01-21 [3] CRAN (R 3.5.2)                    
#>     tibble              3.1.3      2021-07-23 [1] CRAN (R 3.6.3)                    
#>     tictoc              1.0.1      2021-04-19 [3] CRAN (R 3.6.3)                    
#>     tidyr               1.1.3      2021-03-03 [3] CRAN (R 3.6.3)                    
#>     tidyselect          1.1.1      2021-04-30 [3] CRAN (R 3.6.3)                    
#>     tmvnsim             1.0-2      2016-12-15 [3] CRAN (R 3.6.3)                    
#>     units               0.7-2      2021-06-08 [3] CRAN (R 3.6.3)                    
#>     utf8                1.2.2      2021-07-24 [1] CRAN (R 3.6.3)                    
#>     uuid                0.1-4      2020-02-26 [3] CRAN (R 3.6.3)                    
#>     vctrs               0.3.8      2021-04-29 [3] CRAN (R 3.6.3)                    
#>     vegan               2.5-7      2020-11-28 [3] CRAN (R 3.6.3)                    
#>     withr               2.4.2      2021-04-18 [3] CRAN (R 3.6.3)                    
#>     xfun                0.24       2021-06-15 [1] CRAN (R 3.6.3)                    
#>     XML                 3.99-0.3   2020-01-20 [3] CRAN (R 3.6.3)                    
#>     xml2                1.3.2      2020-04-23 [3] CRAN (R 3.6.3)                    
#>     xtable              1.8-4      2019-04-21 [1] CRAN (R 3.6.3)                    
#>     yaml                2.2.1      2020-02-01 [3] CRAN (R 3.6.2)                    
#>     zoo                 1.8-9      2021-03-09 [3] CRAN (R 3.6.3)                    
#> 
#> [1] /homes/ke76dimu/R/x86_64-pc-linux-gnu-library/3.6
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
#> 
#>  V ── Loaded and on-disk version mismatch.
#>  P ── Loaded and on-disk path mismatch.

References

Chao, Anne, Chun-Huo Chiu, and Lou Jost. 2014. “Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers.” Annual Review of Ecology, Evolution, and Systematics 45 (1): 297–324. https://doi.org/10.1146/annurev-ecolsys-120213-091540.
Debastiani, Vanderlei J., and Valério D. Pillar. 2012. SYNCSA Tool for Analysis of Metacommunities Based on Functional Traits and Phylogeny of the Community Components.” Bioinformatics 28 (15): 2067–68. https://doi.org/10.1093/bioinformatics/bts325.
Laliberté, Etienne, Pierre Legendre, and Bill Shipley. 2014. FD: Measuring Functional Diversity from Multiple Traits, and Other Tools for Functional Ecology.
Li, Daijiang. 2018. hillR: Taxonomic, Functional, and Phylogenetic Diversity and Similarity Through Hill Numbers.” Journal of Open Source Software 3 (31): 1041. https://doi.org/10.21105/joss.01041.
Pavoine, Sandrine. 2020. adiv: An r Package to Analyse Biodiversity in Ecology.” Methods in Ecology and Evolution 11 (9): 1106–12. https://doi.org/10.1111/2041-210X.13430.