GithubHelp home page GithubHelp logo

ecological-complexity-lab / emln Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 1.11 MB

An R package for handling and manipulating multilayer network data, mainly for ecological networks

Home Page: https://ecological-complexity-lab.github.io/emln_package/

License: Creative Commons Attribution 4.0 International

R 100.00%
data-structures ecology modeling networkscience multilayer-networks network-analysis

emln's Introduction

Project Status: Active - The project has reached a stable, usable state and is being actively developed.

๐Ÿ‘‹ About

This repository contains the code for the R package EMLN. EMLN is an R package that standardizes workflows for creating, storing and converting mulilayer network data. It also contains data sets of ecological multilayer networks for analysis. Although designed with ecological dcata in mind, it is flexible and can handle data from other research domains.

๐Ÿ“„ Paper and citing

Frydman N, Freilikhman S, Talpaz I, Pilosof S. Practical guidelines and the EMLN R package for handling ecological multilayer networks. Methods in Ecology and Evolution. 2023. DOI:10.1111/2041-210X.14225. Please cite the paper when implementing the guidelines we describe or when using the package, this helps us a lot!

๐Ÿ“ฆ Installation

Current installation uses devtools. CRAN version will come next.

package.list=c("tidyverse", "magrittr","igraph","Matrix","DT","hablar","devtools")
loaded <-  package.list %in% .packages()
package.list <-  package.list[!loaded]
installed <-  package.list %in% .packages(TRUE)
if (!all(installed)) install.packages(package.list[!installed],repos="http://cran.rstudio.com/")

devtools::install_github('Ecological-Complexity-Lab/emln', force=T)
library(emln)

๐ŸŒ Website

Detailed explanations on workflows accomanied by examples for handling monolayer and multilayer data using emln are in: https://ecological-complexity-lab.github.io/emln_package/.

emln's People

Contributors

noa164 avatar shainova avatar shirlyfrei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

emln's Issues

Problem when creating a network with interlayer links

I am having a problem to create a network with interlayer links. First of all, I have two layers loaded ("asia" and "neot"). Then, I specified the layer attributes.

# Specify the layers
layer_attributes = tibble(layer_id=1:2, layer_name=c('Indo-Malayan-Australasian',
                                                     'Neotropics'))

Then I created my interlayer links object:

> interlayer <- tibble(layer_from=c('Neotropics','Neotropics','Neotropics','Neotropics','Neotropics','Neotropics','Neotropics','Neotropics'),
                     node_from=c('Anacardiaceae', 'Araucariaceae','Clusiaceae','Euphorbiaceae','Fabaceae','Moraceae','Myrtaceae','Pinaceae'),
                     layer_to=c('Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia','Indo-Malayan-Australasia'), 
                     node_to=c('Anacardiaceae', 'Araucariaceae','Clusiaceae','Euphorbiaceae','Fabaceae','Moraceae','Myrtaceae','Pinaceae'),
                     weight=1)

Finally, I created the multilayer network object:

mult_resin = create_multilayer_network(list_of_layers = list(asia,neot),
                                             interlayer_links = interlayer,
                                             layer_attributes = layer_attributes,
                                             bipartite = T,
                                             directed = F)

But I obtained the following error:

Error in x[[jj]][iseq] <- vjj : replacement has length zero

How can I fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.