DOI: 10.5281/zenodo.16984068
title: Invasive alien predators overturn the spatial-scaling laws of biocomplexity: Data and R codes to run analyses and to reproduce figures.

description: This archive contains data and R codes to run analyses and to reproduce figures for "Invasive alien predators overturn the spatial-scaling laws of biocomplexity".

 

All R codes are carefully commented. They require that you provide the location where you downloaded and uncompressed the archive on your computer using the following command:

setwd("path_to_archive_location/Supplementary_Materials_Zenodo/").

Paths to files in R codes are for a Linux machine and separate folders with a slash "/". In case you are running these codes on a MS Windows machine, backslashes "\" should be used instead. Any request should be sent to Eric.Edeline@inrae.fr.

 

Data folder contains:

Inventory_data_formatted.txt:





raw biodiversity data at each sampling session.







ROWS: One row is a species at a given sampling session.




COLUMNS:







Milieux: habitat type (pond or marsh)




Id_Sites: sampling site identity




Annee: year of sampling




Date: month of sampling




Taxon: species identity as recording on the field




Technique.d.echantillonnage: sampling technique




Surface: habitat surface area in m2




sampid: identity of sampling session






Observation_matrix.txt:





61 x 61 matrix for the number of times a trophic interaction was studied in the literature (reported as either present or absent). Contains 0 when no report was available, or a positive integer.







ROWS: a trophic species as a prey.




COLUMNS: the same trophic species as predators.



Paper_list.txt:





list of papers used in the literature review.







ROWS: a paper.




COLUMNS:







Author: first author




Year: year of publication




Title: title of publication.




Journal.




Volume.




DOI: when available






Taxa_names_matrices.txt:





contains list of trophic-species names in the order as they appear in the metaweb.



Trophic_link_matrix.txt:





61 x 61 matrix for the number of times a trophic interaction was reported as present in the literature. Includes NA if no observation was available (corresponding to a 0 entry in Observation_matrix.txt).




ROWS: a trophic species as a prey.




COLUMNS: the same trophic species as predators.



 

Metaweb folder contains:

Missing_links subfolder contains:





JAGS_model_for_missing_links.R: R script to run the latent-link model. This requires to also have JAGS installed on your machine (https://mcmc-jags.sourceforge.io/).







Link_occupancy_model.jags: latent-link model in JAGS language.




Link_occupancy_SAMPLES.txt: posterior-samples data from JAGS model.




Link_occupancy_SUMMARY.txt: summary of the JAGS model. Used to produce Table S1 in Supporting Information.




Impute_missing_links.R: R script to impute missing trophic links (NAs in initial Trophic_link_matrix.txt file) from posterior model samples. Produces Weighted_link_matrix.txt file.




Weighted_link_matrix.txt: 61 x 61 matrix for the probability of a trophic link between a prey (row) and a predator (column). Used to produce the metaweb matrix by setting a link as present above an arbitrary probability threshold.



 

Metaweb_figure subfolder contains:





Truncate_latin_names_function.R: R function to truncate trophic-species names for clearer metaweb plotting.




Metaweb_figure.R: R scripts to produce figure of the metaweb (Fig. 2 in manuscript).



 

Species_role_figure subfolder contains:





R script to produce figure of species roles in the metaweb (Fig. 3 in manuscript).



 

 

Local_food_webs folder:

Local_food_web_reconstruction subfolder contains:





Reconstruct_local_observed_food_webs.R: R script to produce local food-web data at each sampling sessions.




Reconstruct_local_food_web_function.R: R function to compute local food-web descriptors at each sampling session from local biodiversity and and metaweb.




Local_reconstructed_food_webs_imputed_missing_links.txt: Local food-web data.



 

Surface_bioinvaders_Model_and_Figure subfolder contains:





Surface_bioinvader_Models_and_Figure.R: R script to produce abundance-area relationships in bioinvaders (Fig. 1 in manuscript) and summaries for the three models (Table S2 in Supporting Information).




Summary_tables.txt: Model summaries as reported in Table S2.



 

Surface_community_Models_and_Figure subfolder contains:





Model_function_surface_community.R: R function used specifically to run models and produce summary statistics in Anova.table.txt and Summary.table.txt.




Surface_community_Models_and_Figure.R: R script calling Model_function_surface_community.R to produce Fig. S1 (effects of bioinvader presence on SARs of native species within specific taxonomic groups, Supporting Information), as well as model summaries and anova tables testing for significance of effects.



 

Surface_food_webs_Models_and_Figure subfolder contains:





Model_function_surface_food_webs.R: R function used specifically to run models and produce summary statistics in Anova.table_imputed_missing_links.txt and Summary.table_imputed_missing_links.txt.




Surface_effects_food_webs_Models_and_Figure.R: R script calling Model_function_surface_food_webs.R to produce Fig. 4 of the effects of bioinvaders on the SAR and NARs (manuscript), as well as model summaries and anova tables testing for significance of effects.