Skip to content

marmello77/multilayer-networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multilayer-networks

A tutorial on how to draw multilayer networks in R.

Ecological Synthesis Lab (SintECO).

Authors: Marco Mello & Renata Muylaert.

E-mail: marmello@usp.br.

First published on November 23rd, 2017 (English version).

DOI

Run in R version 4.0.2 (2020-06-22) -- "Taking Off Again"

Disclaimer: You may use this software freely for any purposes at your own risk. We assume no responsibility or liability for the use of this software, convey no license or title under any patent, copyright, or mask work right to the product. We reserve the right to make changes in the software without notification. We also make no representation or warranty that such application will be suitable for the specified use without further testing or modification. If this software helps you produce any academic work (paper, book, chapter, dissertation, report, talk, lecture or similar), please acknowledge the authors and cite the source, using the DOI or URL of this GitHub repository.

Functionality and origin

The first version of this script was written as part of the analysis carried out by Mello et al. (2019, NatureEcoEvo). Since then, we have been working on making the code shorter, faster, and easier to be used by other people interested in the same topics. You may use this code to learn how to input data on multilayer networks in R, as well to visualize those data as multilayer graphs.

List of folders and files

  1. data (folder)

    a. net1.xlsx -> complete data set from Genrich et al. (2017). Interactions between marsupials, rodents, and plants.

    b. net1an.txt -> angatonistic layer of net1. Seed destruction by marsupials and rodents.

    c. net1links.txt -> the links (edges) of net1 with additional attributes.

    d. net1mu.txt -> mutualistic layer of net1. Seed dispersal by marsupials and rodents.

    e. net1nodes.txt -> the nodes (vertices) of net1 with additional attributes.

  2. figures (folder)

    a. net1.png -> multilayer graph of net1.

  3. multilayer-networks -> script to draw and analyze multilayer networks.

Instructions

Follow the instructions provided in the script "multilayer-networks.R".

Data source

Feedback

If you have any questions, corrections, or suggestions, please feel free to open and issue or make a pull request.

Acknowledgments

We thank our labmates and our sponsors, especially the Alexander von Humboldt-Stiftung, CNPq, CAPES, and FAPESP, who gave us grants, fellowships, and scholarships. Pedro Jordano and Carsten Dormann helped us take our first steps in analyzing and drawing networks in R. Special thanks go to Katherine Ognyanova, who gave us invaluable tips on advanced network drawing in R. We strongly recommend her online tutorial. Last, but not least, we thank the Stack Overflow Community, where we solve most of our coding dilemmas. A dilemma related to converting incidence matrices to make a multilayer network was solved here.

Suggested readings

If you want to understand the theory behind our script, read the following works: