This repository contains all the required data and code to reproduce the analyses and visualization in the following study:
- Kun Guo, Petr Pyšek, Milan Chytrý, Jan Divíšek, Martina Sychrová, Zdeňka Lososová, Mark van Kleunen, Simon Pierce, Wen-Yong Guo. Stage dependence of Elton’s biotic resistance hypothesis of biological invasions. Nature Plants 10:1484-1492.
-
- Download this repo as .zip file and unzip it to a folder.
-
- Open WorldPlantInvasion.Rproj with Rstudio.
-
- Open BioticResistance_InvasionContinuum.qmd and load Data4BioticResistance_InvasionContinuum.RData to access all the code and data used for analyses and figure reproduction.
-
- The folder figures contains all figures included in main text and supplementary. While all figures were generated in R, Adobe Illustrator was used for refinements.
-
- The folder results contains all intermediate results of the SES values of phylogenetic and functional metrics. Due to potential long calculation times, you may import pd.mpd.mntd2024.RDS for further analyses.
BioticResistance_InvasionContinuum.qmd
: Main analysis scriptData4BioticResistance_InvasionContinuum.RData
: Primary datasetfigures
: Folder containing all generated figuresresults
: Folder containing intermediate calculation results
-
Calculating SES values for phylogenetic and functional metrics with large datasets (>10,000 plots and > 1,000 species) is computationally intensive. This study used custom functions i.e., fst.ses.pd, fst.ses.mpd, fst.ses.mntd from the R package ecoloop, with parallelization implemented via R package furrr.
-
Even with a high-performance server (2 Intel Xeon Gold 6226 R CPU and 256 GB memory), calculation took approximately 2 hours. Computation time may vary significantly depending on your hardware.
- For any questions or issues, please open an issue in this respository.