DOI: 10.5281/zenodo.18182793
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, at start of each R session, 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:





contain the raw biodiversity data at each sampling session.







ROWS: One row is a trophic 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, and reported as either present or absent. Contains 0 when no report was available, or a positive integer. This matrix is not used in the analyses presented in the paper.







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 the list of trophic-species names in the same 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 to be 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:





Matching_centrality_model.R: R script to run the matching-centrality model. This requires to also have JAGS installed on your machine (https://mcmc-jags.sourceforge.io/). This script is used to produce Matching_centrality_model.jags, Matching_centrality_model_SAMPLES.txt and Matching_centrality_model_SUMMARY.txt files.







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




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




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




Matching_centrality_cutoff_probability.R: R script to compute the threshold probability that defines the predicted adjacency matrix. Used to produce Matching_centrality_predicted_trophic_matrix.txt file.




Impute_missing_links.R: R script to impute missing trophic links from predicted adjacency matrix. Produces Imputed_link_matrix.txt file.




Imputed_link_matrix.txt: 61 x 61 adjacency matrix of the imputed metaweb.



 

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 figures of the metaweb (Fig. 1 in manuscript and Fig. S1 in Supplementary Information). Requires the user to choose between the observed (non-imputed) and imputed metawebs.



 

Trophic_relationships_figure subfolder contains:





R script to produce figure of trophic relationships in the metaweb (Fig. 2 in manuscript).



 

 

Surface_bioinvaders folder:





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




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



 

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 session. Includes extra food-web metrics. Used to produce data files Local_reconstructed_food_webs.txt and Local_reconstructed_food_webs_imputed_missing_links.txt.




Reconstruct_local_food_web_function.R: R function to compute local food-web descriptors at each sampling session from local biodiversity and and metaweb. Computes more descriptors than used in the paper.



 

Surface_food_webs_Models_and_Figure subfolder contains:





Model_function_surface_food_webs.R: R function used to run models.




Surface_effects_food_webs_Models_and_Figure.R: R script used to produce Fig. 4 in manuscript, Fig. S2 in the Supplement, as well as model summaries and anova tables testing for significance of effects as reported in Table S3.



 

Surface_community folder contains:





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




Surface_community_Models_and_Figure.R: R script used to produce Fig. S3.